Jump to content




APT-GET Package Manager (Early)


  • You cannot reply to this topic
36 replies to this topic

#1 LNETeam

  • Members
  • 111 posts
  • LocationEclipse

Posted 27 August 2014 - 03:46 AM

Hello Computercraft Forums


It's been some time since I did anything in regard to CC, so I figured I'm past due. With work I've been dabbling more in the arts of Linux command line. We all know we need some way to get programs from the internets, to us; right? Well that's what package managers are for, in this case: apt-get. I taken the liberty of making a simple yet fluid and dynamic environment to submit applications to a repo which contains definitions to Github repos that users can download. For example, in order to use my git program, you'd need to download it, drag it in customize and then you can use it for your applications, yet you lack package management. Well I'd like to introduce CCAPT!


CCAPT? What?


CCAPT is a command line program for fetching files, installing them and registering them to a registry so you can update and remove them. I developed a front end developer port online (not quite ready for everyone. I have the login system and everything working, but the registration system is killing me. You can see the login portal at: http://lneteam.ddns.net. It's probably down since it's my dev server and it only stays on for 15 minutes at a time. Will be updated!)


YOU CAN NOW MAKE YOUR OWN ACCOUNT: http://lneteam.ddns.net/reg.php


Features

  • Project dependency resolving: The developer simply adds a INSTALL file to the root of their Github repo with a few lines of code. Within that code, a developer could point to other packages as prerequisites and will attempt to install those dependencies prior to installation.
  • Post and Pre Operations: A developer can add optional pre install actions, for example to prepare a certain file system, whatever. They can also issue post install actions to run at the conclusion of install. for example if you downloaded an install script, you could have that execute immediately after install. (Kinda like MySQL during install)
  • Dynamic Developer base: Everyone gets their own console to add, update, and remove their packages. We store passwords in an encrypted database hash to ensure YOUR security.

Information


Currently, it is very buggy. The Koding environment is being particular with it's anti-phishing protocols, so I'll be migrating over to a stand alone server soon. Which means that CCAPT can't quite connect to the repo just yet. Everything works, except the connection. It works!


Here is a set of login credentials to test the portal:

User: test.tester

Pass: ccrulex


It may be down unless I'm on, but it gives you a feel of the portal. It is completely mobile friendly! Just take a look from your tablet/smartphone! Regardless the repo should be working within a couple of days when I migrate everything over. I shall post the link to the apt-get program so you can see it.




Thank you for looking and hopefully see your project in the repo!


Github for CCAPT: https://github.com/LNETeam/CCAPT

Current Web Server: http://lneteam.ddns.net

Pictures of website: http://imgur.com/HVv...5loEp,7uPOq6b#0


P.S If you have a Github, please submit any issue tickets so I can address them. Thanks! :D


Info: Your INSTALL file should be in the root of your repo and the link you provide, must be a RAW link to it. Most repos will allow you to view a file in a raw format, click that and paste the link for your location.

install =
{
	preAction = function()
		if (fs.exists("/sys")) then
			fs.delete("/sys")
		end
	end,
	Dependencies = {"ccgit"},
	InstallHierarchy =
	{
		{"/M-Tech/startup","/startup"},
		{"/M-Tech/sys/boot/main.int","/sys/boot/main.int"},
		{"/M-Tech/sys/boot/portal.int","/sys/boot/portal.int"},
		{"/M-Tech/sys/boot/version.info","/sys/boot/version.info"},
		{"/M-Tech/sys/boot/~iso-temp/BIOS","/sys/boot/~iso-temp/BIOS"},
		{"/M-Tech/sys/boot/~iso-temp/bootstrap","/sys/boot/~iso-temp/bootstrap"},
		{"/M-Tech/sys/config/bootPrefs.cfg","/sys/config/bootPrefs.cfg"},
		{"/M-Tech/sys/config/sys.cfg","/sys/config/sys.cfg"},
		{"/M-Tech/sys/frameworks/CAUTH.frmk","/sys/frameworks/CAUTH.frmk"},
		{"/M-Tech/sys/frameworks/CUIKit.frmk","/sys/frameworks/CUIKit.frmk"},
		{"/M-Tech/sys/frameworks/kernel.frmk","/sys/frameworks/kernel.frmk"},
		{"/M-Tech/sys/frameworks/mtech-boot.frmk","/sys/frameworks/mtech-boot.frmk"},
		{"/M-Tech/sys/frameworks/mtech-core.frmk","/sys/frameworks/mtech-core.frmk"},
		{"/M-Tech/sys/lib/errors/0x001C.libx","/sys/lib/errors/0x001C.libx"},
		{"/M-Tech/sys/lib/errors/0x001D.libx","/sys/lib/errors/0x001D.libx"},
		{"/M-Tech/sys/program_files/plc","/sys/program_files/plc"},
		{"/M-Tech/sys/programs/os/antiviral.af","/sys/programs/os/antiviral.af"},
		{"/M-Tech/sys/programs/os/dataman.af","/sys/programs/os/dataman.af"},
		{"/M-Tech/sys/programs/os/hpr","/sys/programs/os/hpr"},
		{"/M-Tech/sys/programs/security/portman.af","/sys/programs/security/portman.af"},
		{"/M-Tech/sys/programs/security/togglev2","/sys/programs/security/togglev2"},
		{"/M-Tech/sys/programs/c-chat.af","/sys/programs/c-chat.af"},
		{"/M-Tech/sys/programs/vman.af","/sys/programs/vman.af"},
	},
	postAction = function() os.reboot() end,
}
return install

This is what an INSTALL file should look like. postAction and preAction are optional

Here is the current list of enhancements/bugs: https://github.com/L...am/CCAPT/issues
If you want anything or have a problem, report them here.

Pleased to announce that it is now working! Some features are still not implemented but, it now can download single scripts from the repo. I used MKlegoman357's Redfile for a demo.


Posted Image

Posted Image

Posted Image


Spoiler

Edited by LNETeam, 28 December 2014 - 12:40 AM.


#2 Ferdi265

  • Members
  • 21 posts

Posted 27 August 2014 - 09:44 AM

Nice one. I've always thought that CC needs a package manager. :D

#3 LNETeam

  • Members
  • 111 posts
  • LocationEclipse

Posted 27 August 2014 - 11:28 AM

That's what I'm saying. I tried to make it as user friendly as possible

#4 LNETeam

  • Members
  • 111 posts
  • LocationEclipse

Posted 27 August 2014 - 12:26 PM

I also encourage visitors to submit packages to get a feel for it :D

#5 Kizz

  • Members
  • 99 posts
  • LocationLouisville, Kentucky

Posted 27 August 2014 - 12:33 PM

Is there a website for submitting packages or just here on the forums?

#6 LNETeam

  • Members
  • 111 posts
  • LocationEclipse

Posted 27 August 2014 - 12:34 PM

website http://lneteam.kd.io

You can log in with:
Username: test.tester
Password ccrulex

Everyone will eventually get their own, but the server ain't quite ready yet

Edited by LNETeam, 27 August 2014 - 12:35 PM.


#7 Kizz

  • Members
  • 99 posts
  • LocationLouisville, Kentucky

Posted 27 August 2014 - 12:35 PM

Your link just asks me to log in.

Ahh got it. Adding my KESS file storage solution.

Edited by Kizz, 27 August 2014 - 12:36 PM.


#8 LNETeam

  • Members
  • 111 posts
  • LocationEclipse

Posted 27 August 2014 - 12:38 PM

yes, with those credentials

COOL!

FYI Like I said, the console side won't work just yet, but you can add your package.
If you need an INSTALL example: https://raw.githubus.../master/INSTALL

Edited by LNETeam, 27 August 2014 - 12:37 PM.


#9 Kizz

  • Members
  • 99 posts
  • LocationLouisville, Kentucky

Posted 27 August 2014 - 12:55 PM

Well, it didn't seem to add my package. Not used to GitHub either, so I probably did something way wrong. I would really like to be able to just upload a file or files for my package and not have to link to a Git repository.

Ahh I see, I'm dumb. You're still working on it. Well if you need any help, I have a lot of PHP and webserver experience.

#10 LNETeam

  • Members
  • 111 posts
  • LocationEclipse

Posted 27 August 2014 - 12:58 PM

As of now, the website doesn't have storage internally. That's why I used github. You could use pastebin, but I haven't added that yet. Do you see a package called Example?

Did you fill out the form at the bottom? Because I don't see it in the repo

Just try filling some random stuff into the apt-get form at the bottom of the website and click submit

Edited by LNETeam, 27 August 2014 - 12:56 PM.


#11 Kizz

  • Members
  • 99 posts
  • LocationLouisville, Kentucky

Posted 27 August 2014 - 01:07 PM

I did see example, and I did fill out the form, but once I did that, nothing was added.

It worked! It's in there :D.

However, I can't edit it once it's added. Need to add a description :P.

Edited by Kizz, 27 August 2014 - 01:07 PM.


#12 LNETeam

  • Members
  • 111 posts
  • LocationEclipse

Posted 27 August 2014 - 01:10 PM

You can edit by putting a "+u" at the end of your new version. Pretty much update your things and simple add "+u" to the end of your version. EX: "1.0+u". This will update your entries in the database

#13 Ferdi265

  • Members
  • 21 posts

Posted 27 August 2014 - 01:25 PM

Cool :D

Going to add my EventLoop API.

#14 Kizz

  • Members
  • 99 posts
  • LocationLouisville, Kentucky

Posted 27 August 2014 - 01:25 PM

Updating worked. Nice work man.

#15 LNETeam

  • Members
  • 111 posts
  • LocationEclipse

Posted 27 August 2014 - 01:27 PM

No probs. Just added the info to the tiles. Do they work on your end?

#16 Ferdi265

  • Members
  • 21 posts

Posted 27 August 2014 - 01:30 PM

Info works on my end, but updating info doesn't work for some reason.

#17 LNETeam

  • Members
  • 111 posts
  • LocationEclipse

Posted 27 August 2014 - 01:34 PM

did you add "+u" to the end of your new version? Also you cant change your package name at this point

Also in your Github INSTALL file, return the install table :D

#18 Ferdi265

  • Members
  • 21 posts

Posted 27 August 2014 - 01:48 PM

I did add +u (the version was "1.3+u").

I tried it again, itstill doesn't work xD

Also, fixed INSTALL file.

#19 LNETeam

  • Members
  • 111 posts
  • LocationEclipse

Posted 27 August 2014 - 01:50 PM

I got it to work http://imgur.com/c0pcKvm

Edited by LNETeam, 27 August 2014 - 02:12 PM.


#20 Ferdi265

  • Members
  • 21 posts

Posted 27 August 2014 - 02:13 PM

Ahh, okay, the Info text was just too long, works now :D





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users