Coder Social home page Coder Social logo

wbbaddons / tims-packageserver Goto Github PK

View Code? Open in Web Editor NEW
9.0 6.0 3.0 1.15 MB

Lightweight Package Server for WoltLab Community Framework

Home Page: https://tims.bastelstu.be

License: GNU Affero General Public License v3.0

HTML 2.03% Dockerfile 0.87% Fluent 2.74% XSLT 9.39% Rust 80.87% CSS 0.95% JavaScript 3.16%
woltlab woltlab-suite packageserver

tims-packageserver's Introduction

tims-packageserver's People

Contributors

dependabot[bot] avatar joshuaruesweg avatar max-m avatar stricted avatar timwolla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

tims-packageserver's Issues

Error when using Docker container

When using the Docker container, I get the below. Am I doing something wrong here, or is the mentioned module out of date and causing the issue all by itself?

npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~prestart: [email protected]
npm info lifecycle [email protected]~start: [email protected]

> [email protected] start /usr/src/app
> coffee app.coffee

Error: The module '/usr/src/app/node_modules/node-expat/build/Release/node_expat.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 46. This version of Node.js requires
NODE_MODULE_VERSION 51. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or`npm install`).
  at Object.Module._extensions..node (module.js:600:18)
  at Module.load (/usr/src/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at tryModuleLoad (module.js:449:12)
  at Function.Module._load (module.js:441:3)
  at Module.require (module.js:500:17)
  at require (internal/module.js:20:19)
  at bindings (/usr/src/app/node_modules/bindings/bindings.js:76:44)
  at Object.<anonymous> (/usr/src/app/node_modules/node-expat/lib/node-expat.js:4:32)
  at Module._compile (module.js:573:32)
  at Object.Module._extensions..js (module.js:582:10)
  at Module.load (/usr/src/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at tryModuleLoad (module.js:449:12)
  at Function.Module._load (module.js:441:3)
  at Module.require (module.js:500:17)
  at require (internal/module.js:20:19)
  at Object.<anonymous> (/usr/src/app/node_modules/xml-stream/lib/xml-stream.js:2:22)
  at Module._compile (module.js:573:32)
  at Object.Module._extensions..js (module.js:582:10)
  at Module.load (/usr/src/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at tryModuleLoad (module.js:449:12)
  at Function.Module._load (module.js:441:3)
  at Module.require (module.js:500:17)
  at require (internal/module.js:20:19)
  at Object.<anonymous> (/usr/src/app/node_modules/xml-stream/index.js:1:80)
  at Module._compile (module.js:573:32)
  at Object.Module._extensions..js (module.js:582:10)
  at Module.load (/usr/src/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at tryModuleLoad (module.js:449:12)
  at Function.Module._load (module.js:441:3)
  at Module.require (module.js:500:17)
  at require (internal/module.js:20:19)
  at Object.<anonymous> (/usr/src/app/packageListReader.coffee:25:13)
  at Object.<anonymous> (/usr/src/app/packageListReader.coffee:1:1)
  at Module._compile (module.js:573:32)
  at Object.loadFile (/usr/src/app/node_modules/coffee-script/lib/coffee-script/register.js:16:19)
  at Module.load (/usr/src/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at tryModuleLoad (module.js:449:12)
  at Function.Module._load (module.js:441:3)
  at Module.require (module.js:500:17)
  at require (internal/module.js:20:19)
  at Object.<anonymous> (/usr/src/app/app.coffee:26:21)
  at Object.<anonymous> (/usr/src/app/app.coffee:1:1)
  at Module._compile (module.js:573:32)
  at Object.exports.run (/usr/src/app/node_modules/coffee-script/lib/coffee-script/coffee-script.js:162:23)
  at compileScript (/usr/src/app/node_modules/coffee-script/lib/coffee-script/command.js:224:29)
  at compilePath (/usr/src/app/node_modules/coffee-script/lib/coffee-script/command.js:174:14)
  at Object.exports.run (/usr/src/app/node_modules/coffee-script/lib/coffee-script/command.js:98:20)
  at Object.<anonymous> (/usr/src/app/node_modules/coffee-script/bin/coffee:7:41)
  at Module._compile (module.js:573:32)
  at Object.Module._extensions..js (module.js:582:10)
  at Module.load (module.js:490:32)
  at tryModuleLoad (module.js:449:12)
  at Function.Module._load (module.js:441:3)
  at Module.runMain (module.js:607:10)
  at run (bootstrap_node.js:382:7)
  at startup (bootstrap_node.js:137:9)
  at bootstrap_node.js:497:3


npm info lifecycle [email protected]~start: Failed to exec start script
npm ERR! Linux 4.4.0-45-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v7.0.0
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `coffee app.coffee`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script 'coffee app.coffee'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the tims-packageserver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     coffee app.coffee
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs tims-packageserver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls tims-packageserver
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /usr/src/app/npm-debug.log

HTTPS Fails and also Packages doesnt get listed

Yes, the title says everything. In the Browser (behind a reverse proxy) i get the following error: Unsafe attempt to load URL on://package.herrtxbias.net/style/main.xslt from frame with URL https://package.herrtxbias.net/. Domains, protocols and ports must match.

And when i try to load it directly (http://fra1.server.herrtxbias.me:9001/) i'm getting back, that there are no packages, which is wrong, because i've added one project, like in the tutorial. If somebody has any ideas, just let me know!

Auth causing errors

I just set up the package server but it keeps throwing the error below:
Invalid salt. Salt must be in the form of: $Vers$log2(NumRounds)$saltvalue

I tried with * and $v > 1.0.0 but the error stays the same.

{
	"users": {
		"admin": {
			"passwd": "asdklawjido",
			"groups": [ "Administrator" ],
			"packages": {
			}
		}
	},
	"groups": {
		"Administrator": {
			"*": "*"
		}
	}
}

Cannot find package error with package requirement

Hey,

when trying to update a package which has a new requirement, WoltLab throws the error Cannot find package while the required package is included in the uploaded package in the package server.
Manually uploading the same package file works without an error.

Unable to get docker image to work anymore

Hey,

I was trying to install the docker image on a new server and was no longer able to get it to work.
curl -I http://localhost:9001 just returns HTTP/1.1 405 Method Not Allowed and docker logs doesn't show anything, so not sure how to troubleshoot this further without any log results.

Installation process:

git clone https://github.com/wbbaddons/Tims-PackageServer.git
cd Tims-PackageServer/
docker-compose up --build -d
curl -I http://localhost:9001

Tims-PackageServer/docker-compose.yaml

version: "3"

services:
  packageserver:
    build: .
    restart: always
    ports:
      - "9001:9001"
    environment:
      DEBUG: "PackageServer:*"
    volumes:
      - /srv/docker/packageserver/packages:/var/lib/PackageServer/packages

Incorrect encoding

I have tested your package server and found until now no errors except for one little thing.

The information at the end of the output looks like this:
This list was presented by Tims Package Server 1.0.0 &lt;https://github.com/wbbaddons/Tims-PackageServer&gt;

I think that the correct output should be:
This list was presented by Tims Package Server 1.0.0 <https://github.com/wbbaddons/Tims-PackageServer>

Fehler bei der Docker benutzung

Hey,

ich benutze die Docker version von dem Package Server, ich bekomme auch alle Packages angezeigt, jedoch wenn Woltlab versucht, die Pakete zu laden, kommt nur ein Fehler:
Beim letzten Verbindungsversuch trat folgender Fehler auf: Die Paketliste konnte nicht abgerufen werden (0)

Irgendeine Idee?

Error: ENOENT, stat

npm start

[email protected] prestart /XXX/Tims-PackageServer
npm install

npm WARN package.json [email protected] No repository field.

[email protected] start /XXX/Tims-PackageServer
coffee app.coffee

info: Using config '/XXX/Tims-PackageServer/config.js'
info: Starting update
warning: /XXX/Tims-PackageServer/packages/de.stricted.ldap/latest is missing
info: Finished update
notice: Updated auth
watching the path /XXX/Tims-PackageServer/packages/ failed with error { [Error: ENOENT, stat '/XXX/Tims-PackageServer/packages/de.stricted.ldap/latest']
errno: 34,
code: 'ENOENT',
path: '/XXX/Tims-PackageServer/packages/de.stricted.ldap/latest' }
watching the path /XXX/Tims-PackageServer/packages/ failed with error { [Error: ENOENT, stat '/XXX/Tims-PackageServer/packages/de.stricted.ldap/latest']
errno: 34,
code: 'ENOENT',
path: '/XXX/Tims-PackageServer/packages/de.stricted.ldap/latest' }

Run on https

Nginx:

server {
	listen 80;
	listen 443 ssl;

	ssl_certificate    /etc/letsencrypt/live/update.wsc-connect.com/fullchain.pem;
	ssl_certificate_key    /etc/letsencrypt/live/update.wsc-connect.com/privkey.pem;

	server_name update.wsc-connect.com;

	location / {
		proxy_pass http://localhost:9001;
		proxy_pass_header Server;
		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection 'upgrade';
		proxy_set_header Host $host;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_cache_bypass $http_upgrade;
	}
}

npm start --ssl=true works for the http server, but the https server links the stylesheet to http://update.wsc-connect.com/style/main.xslt, so https://update.wsc-connect.com/ yields an error in the developer console.
How to fix that?

Breaking issue causing requiredpackage names to get split

The requiredpackage entries are getting split on uppercase letters for some reason, causing the updating via the package server to error out with invalid requirements.

The package.xml in the plugin:

<requiredpackages>
	<requiredpackage minversion="5.2.0 RC 1">com.woltlab.wcf</requiredpackage>
	<requiredpackage minversion="5.2.0 RC 1">com.woltlab.wbb</requiredpackage>
	<requiredpackage minversion="5.2.0 RC 1">com.woltlab.wcf.conversation</requiredpackage>
	<requiredpackage minversion="5.2.0">com.cls-design.wcf.layoutExpansionKit</requiredpackage>
</requiredpackages>

The resulting output from the Package Server:

<requiredpackages>
    <requiredpackage minversion="5.2.0 RC 1">com.woltlab.wcf</requiredpackage>
    <requiredpackage minversion="5.2.0 RC 1">com.woltlab.wbb</requiredpackage>
    <requiredpackage minversion="5.2.0 RC 1">com.woltlab.wcf.conversation</requiredpackage>
    <requiredpackage minversion="5.2.0">com.cls-design.wcf.layout</requiredpackage>
    <requiredpackage minversion="5.2.0">ExpansionKit</requiredpackage>
</requiredpackages>

Support gzip packages

Hey,
it would be great if gzip packages with the endings tar.gz and .tgz would be supported.

basePath and the host header

You recently deprecated setting the basePath variable in the config file and recommended to rather configure a reverse proxy to add a proper host header.

This creates problems when not running on the root of your domain, e.g.
http://example.com/package-server/
By only using the host header and ignoring the base path (/package-server/), the server creates wrong URLs for his own resources and back links, rendering it disfunctional.

Small route issue

?packageName=be.bastelstu.wcf.qr&packageName=be.bastelstu.wcf.signer redirects to /be.bastelstu.wcf.qr,be.bastelstu.wcf.signer

Search not finding all packages

Hey,

for some reason, the search in WoltLab is not finding all packages from this package server.
While the search doesn't find the package, the update search does.

What could be causing the issue?

vivaldi_2022-04-17_01-37-02
2022-04-17_01-39-31

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.