The EuroCMS Package Manager
When needing to install, remove, update packages from wherever.
Think about
- Writing my own package format?
.tar.xz renamed to .ecms? Same as zip being used to rename to anything? doc,docx.
- keep using tar balls?
Example .ecms Folder Structure
Might change in the future
- Files.EuroCMS.v0.0.2.ecms
- Files/
- controller/
- Files.mod.php
- Files.dashboards.php
- css/
- Files.cont.css
- Files.dashboards.css
- files/
- Files.cont.sql
- docs/
- SAVING.md
- DELETING.md
- js/
- Files.cont.js
- Files.bottom.cont.js
- tmpl/
- Files.cont.tmpl.php
- handlers/
- Files.storage.handlers.php
- metadata.json
- permissions.json
- dependencies.json
- Files.sha512sum
- controller/
- Files/
Notes
Things to remember when writing a package manager?
- File validation?
gpg,ssdeep,sha[0-9]{1,3}sum
https://gnupg.org/download/integrity_check.html
https://www.gnupg.org/gph/en/manual/x135.html
https://www.devdungeon.com/content/how-verify-gpg-signature
- hashed file values
Package json file
Embed this in the package manager file? Create a custom shebang? ?ECMS.
For example use the deb package information:
Package: nginx
Version: 1.20.2-1~jammy
Architecture: amd64
Maintainer: NGINX Packaging <nginx-packaging@f5.com>
Installed-Size: 3146
Depends: libc6 (>= 2.34), libcrypt1 (>= 1:4.1.0), libpcre3, libssl3 (>= 3.0.0~~alpha1), zlib1g (>= 1:1.1.4), lsb-base (>= 3.0-6), adduser
Conflicts: nginx-common, nginx-core
Replaces: nginx-common, nginx-core
Provides: httpd, nginx, nginx-r1.20.2
Filename: pool/nginx/n/nginx/nginx_1.20.2-1~jammy_amd64.deb
Size: 991196
MD5sum: 366c0c7cb8faf713d1a29bae919f0e50
SHA1: ed1f1b0f1cfa2e6c8e7d63892d2932c3295342c9
SHA256: 870fd7e7b04f133de034d0a76fce3fe156a207b59504f80fcadfe4d51d8dbbe7
Section: httpd
Priority: optional
Homepage: https://nginx.org
Description: high performance web server nginx [engine x] is an HTTP and reverse proxy server, as well as a mail proxy server.
These json are still work in progress.
SLIM
Removing the update link etc... The repo software should have all the necessary information.
Needed key in the json
- ecms.version - [0-9.]
For our own repo, this is not necesary. But for when we have the repo plugin, customers have not updated it, their package json file might still contain removed,renamed keys.
It would be needed to see which package version they are using, so that the required keys can be parsed in the correct way.
-
app.name: [a-zA-Z] Obviously this would be needed.
-
app.version [0-9.]
To display the version of the package
- app.channel: pre-alpha,alpha,beta,stable
For when the ECMS developers has a different
{
"ecms":{
"version":"0.0.1"
},
"package":{
"name":"trid",
"version":"0.2.1",
"channel":"stable",
"maintainer":"Imri Paloja <imri@packages.eurocms.eu>",
"installed-Size":"145",
"homepage":"https://packages.eurocms.eu/libraries/trid",
"depends":null,
"conflicts":null,
"breaks":null,
"replaces":null,
},
"app":{
"author":"Marco Pontello <marcopon@nospam@gmail.com>",
"version":null,
"homepage":"https://mark0.net/soft-trid-e.html",
"description":"File Identifier",
"component":"library",
}
}
changes.json
List of changes instead of a changes.md
{
"Files":{
"name":"Files - Mosiac release",
"author": "Imri Paloja <imri@eurobytes.eu>"
"release_date":"",
"version_release":"1.2.3",
"description":"htmlentities($desc,true)",
"changes":{
"update":{
"jquery":"1.13.1"
},
"remove":{
"normalize.css":""
},
"fix":{
"bux":"Files not being uploaded"
},
"add":{
"add":{
"skeleton":"1.2.3"
}
},
"change":{
"browscap":"Not starting it up during runtime. Users can load it when necessary."
},
"breaking":{
"core":{
"renamed":"$FullUri variables to FULL_URI php constant",
"removed":"the $Loggedin boolean variable."
},
"modules":{
"files":{
"renamed":"UploadFile() function to Upload()",
"removed":"the $Loggedin boolean variable.",
"update":"Updated Function Test1() to Test2"
}
}
}
}
}
}
Full
{
"ecms":{
"version":"0.0.1",
"data":{
"author":"Imri Paloja <imri@eurobytes.eu>",
"package":"Files",
"version":"1.0.1",
"component":"modules",
"docs":"docs/ - figure how to do this",
"organization":{
"name":"EuroBytes",
"chamber_of_commerce_number":"1234567890",
"address":{
"country":"Linux",
"state_province":"Debian",
"city":"Ubuntu",
"zip_code":"2204 JJ",
"street":"Localhost 127"
},
"opening_hours":{
"Monday":"09:00,17:00",
"Tuesday":"09:00,17:00",
"Wednesday":"09:00,17:00",
"Thursday":"09:00,17:00",
"Friday":"09:00,17:00",
"Saturday":null,
"Sunday":null
},
"phone_number":"+00 (0) 12 - 345 67 89",
"timezone":"Europe/Amsterdam",
"email":"support+modules+files@packages.eurocms.eu"
},
"homepage":"https://packages.eurocms.eu/modules/Files",
"description":"The EuroCMS Files Module allows you to manage different types of files.",
"maintainers":{
"current":"John Doe <john.doe@packages.eurocms.eu>",
},
"Installed-Size":"1024",
"dependencies":{
"components":{
"libraries":{
"exiftool":"=>0.0.1",
"trid":"=>0.0.1"
}
},
"php":{
"imagick":{
"version":"7.4",
"requirement_level":"hard"
},
"php-exif":{
"version":"7.4",
"requirement_level":"hard"
}
}
},
"Provides":{
"features":{
"files_add":"The ability to upload files",
"files_remove":"The ability to remove files"
},
"ajax":{
"RefreshAjax":"Refresh page via ajax"
},
"planner":{
"Refresh":"Refresh something"
},
"dashboards":{
"view":"View Files From the dashboard"
}
},
"update":{
"version_location":{
"GET":"https://packages.eurocms.eu/modules/Files/latest_version.txt",
"dns":"modules.Files.packages.eurocms.eu"
},
"download":"https://packages.eurocms.eu/modules/Files/VERSION/Files-VERSION.ecms",
"changelog":"https://packages.eurocms.eu/modules/Files/VERSION/Files-VERSION.txt",
"validation":{
"md5sum":"https://packages.eurocms.eu/modules/Files/VERSION/Files-VERSION.ecms.md5sum",
"sha1sum":"https://packages.eurocms.eu/modules/Files/VERSION/Files-VERSION.ecms.sha1sum",
"sha512sum":"https://packages.eurocms.eu/modules/Files/VERSION/Files-VERSION.ecms.sha512sum",
"gpg":"https://packages.eurocms.eu/modules/Files/VERSION/Files-VERSION.ecms.gpg"
},
"license":{
"GET":"https://packages.eurocms.eu/modules/Files/VERSION/Files-VERSION.license",
"accept_license":true
}
},
"permissions":{
"components":{
"core":{
"uploads":{
"execute":"Need the core Uploads component to upload files."
},
"database":{
"files":"Need to have access to the files database table, for storing of files metadata and such."
}
},
"modules":{
"users":{
}
},
"widgets":{
"NavMenu":{
}
},
"libraries":{
"exiftool":{
"read":"By default you get access to the main features, reading of metadata in exiftools case.",
"validate":"To validate files",
"thumbnail":"To extract thumbnails from files."
},
"trid":"read"
}
},
"php":{
"cURL":{
"read":"Contemplate on this one??"
}
}
}
}
}
}