Skip to main content
Welcome guest. | Register | Login | Post

A management-system for EasyLFS

Since I will, with the next release, move all the EasyLFS-information over to the new site which has be gratefully sponsored by the Nuxified community I want to be this site more than a mere presentation- and download-platform for my little project.
I also want to use it as a development-tool. No, I don't want to run test-builds on the server, but I want to have an easy way to manage all information related to EasyLFS, like the documentation, package-list and things like that.

Since I'm a guy who likes to do things myself I started thinking about how this could be done in a way that this project might not only be suited for EasyLFS, but also for other projects, or at least other distro-projects.

What I have until now (after about a week of work, mostly in the bus, or in the evening after work) is a DB-design with so far 11 tables, which will house more or less everything. Even the menus, except for login and logout, will be stored in the DB.
There are different permissions which can be assigned to groups, which then can be assigned to a project (yes, more than one project is possible with that little tool). Users of course can be in more than one group and through that can have different permissions in different projects.
A group can also be associated with no project, which makes it a "global group", which of course only makes sense with the site-management-permissions, like creating projects and things like that.
Each permission is represented by a certain bit, which makes it easy to combine permissions from different groups (a global and a project-group) to determine the actual permissions of the user.

Finding the right set of permissions actually was the hardest part. I already did some sites that use databases, and also my website is entirely coded by myself.
A big focus there always goes towards security, so that everything that comes in is checked and validated. I don't want anybody mess with my stuff.
My website actually is a project that took me more than 3 years to "complete" (it's still not complete, for example there's hardly any "design"), because I wrote code, and always learned new stuff, which made me change passages, and sometimes rewrite entire scripts. One big workover included rewriting nearly all scripts, but it was a big step forward in terms of security.

So now, after 6 or 7 years of work with PHP, where I always tried to learn and try new things, I can take all what I have learned and put it into this management-system for EasyLFS.

Most of the content will be handled as what I call "documents". This is a pretty generic term, and that's the way I want it, because these documents can be more or less everything.
Through document-types it is possible to specify what these documents actually are and what they look like, because every document-type can have its own template.
The flexible menu-system even makes it possible add a link to a document right into the main menu, so that important pages can be displayed there.
Also it is possible to include documents into a newsfeed. There I'll possibly also offer having different feeds, one with site-infos (documents not associated to any project) and one per project. The database-design and the code allow this to be done easily.

One exception from the document-standard are packages. Each package can have two versions, a release-version (the one that is included in the last release) and a development-version (the one that's currently residing on my hard-drive to be included into the next release). The packages then make up the package-list, which will show the packages included in the current release, and some information on a tracking-page which will, among other information, display new and updated packages.

By the way, many functions of this site rely on some of my classes, like the newsfeed, which is created with my RSS2-class, or all the DB-handling, which is done with my class MultiSQL.

Well, that's what I have in mind so far. I'll keep you posted about this because for sure more stuff is coming up as the system grows. I'm still in a quite early stage of development, there are still some scripts to be written. So far it is only possible to manage the menu, and to create and delete projects.

Comments

Sounds quite cool and

Sounds quite cool and you'll be able to immediately show it off through EasyLFS on Nuxified.com. Looking forward to it. Smiling

Cheers

That's what I'm writing it

 

That's what I'm writing it for. For the new project-site on Nuxified.com. :-)
And if I think it's cool enough I might publish it too. Maybe somebody else finds it useful. Managing DON'T PANIC comes into ones mind there. ;-)

Oh, that's great. I've

Oh, that's great. I've initially been thinking about just putting some RSS feeds on the homepage for various projects that will be hosted there with nice big links to each. I suppose something like that could be the homepage front end to what you're writing.

In any case, sounds even better. Smiling

Cheers

Well, if you're interested

 

Well, if you're interested you are welcome to take a look at it as soon as I reach a stage where it gets something like usable.
I could upload an archive on the server or even put it up in a subdirectory for you to play around with.

Sure, I wouldn't mind that.

Sure, I wouldn't mind that. Smiling

But even if it wont have a modifiable front-page theme it shouldn't be a problem to just create an index.php and link from it to your system. The homepage is really just a nice splash with some basic info on the projects being hosted and the latest news from them, just something to attract people to projects once they visit Nuxified.com.

I progressing quite

 

I progressing quite quickly.
Today I made a few changes on the DB-design and changed the scripts a bit to use a few of the functions I had written for my website (which are all supposed to make it hard to do SQL-injections).
I'll try to finish the project-management before I go to sleep tonight, and tomorrow I'll attack user- and group-management. Since it's a public holiday tomorrow, mid-autumn festival, I should be able to get that done tomorrow.

At that time it might be possible to upload a first version for a little preview, although the most important parts, the documents and the packages, are still missing. But at least it should be able to give a quick overview of how it works, how it's used and what it's capable of.
Of course that early version is still completely without design. It has a basic layout, but that's it.

I'll keep you posted.

That's great to hear. Don't

That's great to hear. Don't worry about the design, as long as the functionality is there the make up can come later. That's where I might be able to help a bit. Smiling

Thanks for the update.

I always follow the motto

 

I always follow the motto "form follows function". Because the function what's important about things like that. It's no use if it looks great but cannot be used.
And anyway, I'm not that much of a designer.
I'm still struggling to create cool logo for EasyLFS.

As I thought I'm

 

As I thought I'm progressing quite nicely today.
User- and group-management is nearly done, I "only" need to code the part where I assign users to groups, and that should be it for today.
Then the system finally get usable without having to bounce through the database to add users, groups and stuff.

Also I did a couple of changes on the existing scripts, which should increase security. Before it was actually possible to manage data related to projects the user has no permissions for, that problem should be removed now.

Documents and projects are still waiting to be implemented, but that's something for the coming weekend.

I'll keep you posted about my progress and when it's ready for a test-drive.

Well, everything's set up,

 

Well, everything's set up, but, as I just found out, the server is running PHP4, which delays the first test-drive until tomorrow.
The reason is that I've used the PHP5-versions of my classes to code the system, but these don't work with PHP4.
I have PHP4-versions, but at least for one class I need to adjust a bit of code.

No problem. There was a

No problem. There was a reason why PHP 4 set up instead of PHP 5, but I can't remember exactly what it was right now. It was a while ago.

If it proves to be worth it and wont break any existing stuff on the server we could switch to PHP5 at some point.

Cheers

Well, one good reason would

 

Well, one good reason would be that PHP4 is now officially discontinued in favor of PHP5 and the coming PHP6.
So far I haven't experienced any major problems when switching from PHP4 to PHP5, it's mostly backward-compatible and only a few things are different.
Usually it shouldn't be a problem.

Maybe you check what's running on that box and see on their websites if it's compatible to PHP5.

Okay, I've made the

 

Okay, I've made the necessary changes, had to replace the classes with their PHP4-versions and had to add two lines to index.php, that should be everything necessary.
So now it works and can be tested.
I'll send you the URL and login-information right after I finished this post.

Feel free to play around with the site as you wish. If you like you can also try to circumvent all the stuff I put in to make it secure, like SQL-injections or editing sections you're not supposed to have access to.

After you made yourself a first impression of the system it would be great to know what you think about it.

As said, package- and document-management are not there yet. But there's some other stuff to play around with, like users, groups and projects.

reptiler wrote: Feel free

reptiler wrote:

Feel free to play around with the site as you wish. If you like you can also try to circumvent all the stuff I put in to make it secure, like SQL-injections or editing sections you're not supposed to have access to.

You mean try to crack it? Ah I'm afraid I am not that sophisticated. Sticking out tongue

I played around a bit and as I said in PM, it's quite simple and straightforward. Of course this may also be cause it's just a skeleton functionality right now basically, but hey, that's a characteristic that adds to simplicity as well. Anyway, I like that for a new project there is an additional separate menu where groups can be assigned to that project and users put into those groups. I haven't been working with many project management systems, but I think some actually just stuff this sort of thing in an existing menu so it's harder to make a distinction...

Not sure what else to say. I think it's on the right track and considering how fast you developed it this is great. You might want to have someone else involved with Nuxified.com projects to take a look into it as well, who is a bit more experienced with project management systems.

Cheers

Yeah I'm aware of it's

Yeah I'm aware of it's discontinuation. I think switching shouldn't be an issue. I'll add it to my todo list (not sure about today, I really have to work on that gaming tourney video). I assume PHP4 modifications you just made to PMS will work on PHP5 when it's on there as well?

Cheers

Thanks

 
libervisco wrote:

You mean try to crack it? Ah I'm afraid I am not that sophisticated. Sticking out tongue

Well, that was the idea. Like changing a few parameters that are passed in the URL, and seeing what happens. Usually it should always throw you either to the site above (like from permission-management back to group-management) or to the main page.
I'm anyway doing a lot of redirecting there, mostly to avoid double-entries when pressing reload. That's easily avoided with a nice, quick redirect. ;-)

libervisco wrote:

I played around a bit and as I said in PM, it's quite simple and straightforward. Of course this may also be cause it's just a skeleton functionality right now basically, but hey, that's a characteristic that adds to simplicity as well.

Well, thank you for that positive feedback. It actually shouldn't get much more complicated, I like things straight forward and I'll try to keep the rest the same way.

libervisco wrote:

Anyway, I like that for a new project there is an additional separate menu where groups can be assigned to that project and users put into those groups. I haven't been working with many project management systems, but I think some actually just stuff this sort of thing in an existing menu so it's harder to make a distinction...

That's one thing I wanted right from the start, having the menus seperated for the projects, and on top one for global stuff. In the background it's the same scripts, with a few checks here and there to decide how to behave. ;-)

libervisco wrote:

I think it's on the right track and considering how fast you developed it this is great.

Thank you. :-) It isn't actually that much, I guess the documents and the packages might add quite some code to it. But I was actually surprised on how small it still is.

libervisco wrote:

You might want to have someone else involved with Nuxified.com projects to take a look into it as well, who is a bit more experienced with project management systems.

That's a great idea. Maybe a few of the other frequent users might be interested in having a look around, and maybe somebody could try fooling the system in some way. Of course I wouldn't want anybody do that, but the guys I'm familiar with here I guess we can trust about that, right?

Anyway, if anybody wants to have the URL and login-information feel free to contact me via PM.

Right. PHP4-classes also

 

Right. PHP4-classes also work with PHP5, but not the other way around.

And maybe I'll even let it be that way, at least for now, that way the system is not unnecessarily incompatible to PHP4 (although it's absolutely deprecated now).

Okay, a little

 

Okay, a little update.
Package-management is implemented.
And, what's really cool, I implemented a "one-click-release-system".
This button will just transfer all development-versions to the release-versions, clear dev-versions and delete packages that are market for removal.
Otherwise it would be necessary to edit the project, and then each package one by one, which of course would take a while when you have a lot of packages, like is the case with EasyLFS.

The document-management is still missing, and then I'll finally need to find a way to display all the information to visitors.

That

That one-click-release-system sounds pretty awesome. Looks like future Nuxified.com hosted projects are in for quite a treat. Smiling

That is if they want to use

 

That is if they want to use it.
Thing is, so far, that it doesn't support managing projects on multiple sites yet.
But this actually is something that could be worth considering, and might actually be pretty cool. Just at this moment I have actually no idea how I should implement this. Problem is that everything is just stored in the database, except the released files for download of course.
So I don't know how we could actually map things like http://easylfs.nuxified.com to something like let's say http://www.nuxified.com/index.php?project=1 and then only show the part for the project, without the global management-stuff.

Easier would be something that's sorted in a way similar to SourceForge, like http://www.nuxified.com/easylfs, which could, with mod_rewrite, easily be mapped to http://www.nuxified.com/index.php?project=easylfs, which in turn could be resolved by the script and then handled accordingly.

If somebody has an idea how to tackle that multisite-problem, I'll be all ears. And if I find something, I'll post it.

One way might be separating the scripts into global scripts and project scripts, but still having all access the same db. Then for each created project the project-scripts would have to be installed. But that would give everybody access to the db, which is not secure. Which doesn't mean that I don't trust people around here, it's just the security-guy in myself living out his paranoia. ;-)

I'm pretty much a noob

I'm pretty much a noob here, but wouldn't it be possible to just store the paths to these other projects in a db and then allow the main script to just scan these paths for changes, modifications etc. That's probably be something similar to that last possibility you described, except that it wouldn't plant any scripts in specific projects directory.

The problem is that the

 

The problem is that the plan is using different subdomains/vhosts. The script can detect the address called by the client, that's no problem, so maybe by this there could be a way. Then actually all vhosts would use the same directory with data, but the scripts determines by hostname what to show.
Last problem here might be the uploaded files. Since these can be pretty big I don't plan on integrating an upload-interface, so there would have to be a secure solution for that.

Another little update:

 

Another little update: Project-info can now be displayed, in some nice tables. A release-page shows the software in the current release, a development-page shows the updated, new and removed packages, each in their own tables for good overview.
Also I made package-management a bit easier. That script now has a function to import and export CSV-files with package-information.

Next up is the display of the documents, for which I need to make some doctypes and templates first, and the newsfeed also needs some tweaking. But then it should be more or less ready for use, or at least for another test-run.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.