Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 20 Oct 2014, 06:29
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Alternative way to build Ubuntu / Debian Puppy
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 8 [109 Posts]   Goto page: 1, 2, 3, ..., 6, 7, 8 Next
Author Message
jamesbond

Joined: 26 Feb 2007
Posts: 2221
Location: The Blue Marble

PostPosted: Tue 03 Jun 2014, 01:58    Post subject:  Alternative way to build Ubuntu / Debian Puppy  

Presenting an alternative way to build Puppy Linux from Ubuntu/Debian base distros.
As previously discussed http://murga-linux.com/puppy/viewtopic.php?p=780293#780293.

What's different between this and standard Woof2 build? This one builds Ubuntu/Debian directly from their native packages, except packages they don't have (e.g. Xdialog, gtkdialog). Hopefully, this way, it will be more compatible than standard Woof2-build puppy. The packages installed is registered with dpkg and can be listed/uninstalled by dpkg.

There are a lot more features, but features aren't the goal. Making it easier to build puppy is - so I'll stop talking about features, discover it yourself and ask if you're confused.

Get the code from here - switch to "deb-build" branch: https://github.com/jamesbond3142/woof-CE/tree/deb-build

How to use:
-----
1. You need to have a fully working "dpkg" package installation in your host system: you need at least "dpkg" and "dpkg-deb". I tested with the full dpkg, I don't know whether it will work with busybox's dpkg.

2. Run merge2out as usual. Choose x86 and x86 (that's the only thing supported at the moment); the rest of the options doesn't matter.

3. cd to the output directory created by merge2out.

To create 32-bit Tahr build:
./deb-build.sh

To create 64-bit Thar build:
ARCH=amd64 ./deb-build.sh

To create 32-bit Unicorn build:
VERSION=utopic ./deb-build.sh

To create 64-bit Unicorn build:
ARCH=amd64 VERSION=utopic ./deb-build.sh

To create 32-bit Debian Sid build:
REPO_URL=http://ftp.au.debian.org/debian REPO_PKGDB=Packages.xz VERSION=sid ./deb-build.sh

To create 64-bit Debian Sid build:
ARCH=amd64 REPO_URL=http://ftp.au.debian.org/debian REPO_PKGDB=Packages.xz VERSION=sid ./deb-build.sh

and so on.

This will download the package database, read "ubuntu-pkglist" and install packages listed there (including dependencies), and build puppy.sfs in "iso/iso-root".

4. Then build an experimental iso by running ./build-iso.sh.
This will fetch Fatdog64's kernel and kernel modules from ibiblio, and complete the contents of "iso/iso-root" and build puppy.iso in "iso".

The iso should be good enough for testing with qemu and virtualbox.

What you can do with the iso?
-----
The iso will boot to a command line (pfix=nox). There is only minimal packages included in the ISO, they are mainly shell, command line utilities, Xorg, jwm, rox-filer, urxvt and mtpaint for testing. For 32-bit builds, there is also Xdialog and gtkdialog that I took from Slacko 5.7. For 64-bit builds, I took Xdialog and gtkdialog from Fatdog64 631.

Once you boot the iso, you may want to run "jwm_menu_create" to fix jwm's menus (you cannot do "fixmenus" as it is missing a tool which is needed for its work, jwm-xdgmenu)). Then start desktop by typing "xinit" (don't use xwin, it doesn't work yet). If you're lucky will be presented with the first-setup screen, quickly quit from that because it't not working (I haven't tested). To quit the graphical desktop, open terminal and then "kill X" or "logout" from jwm menu.
To shutdown, type "poweroff" - but you must kill leave the desktop first. When shutting down, you will be presented with the usual save gui/cli - be warned I have not tested whether it works.

5. Once you're familiar with the build, you may want to look at ubuntu-pkglist. This file contains the list of packages that will get into the build. The comments inside should be pretty explanatory.

Important Note:
1. This is meant for puppy builders.

2. It does *NOT* build a working puppy as you know it. Still needs work in terms of adding the correct packages, minimising the build (deleting unnecessary stuff), and obviously, fix the brokenness.

3. The kernel used is 64-bit kernel from Fatdog64, thus the sample code will not run on 32-bit machines unless you change the kernel (just replace vmlinuz and kernel-modules.sfs in iso/iso-root and re-run build-iso.sh). The kernel you compiled must contain enough drivers to access and load kernel-modules.sfs - usually this means filesystem drivers, usb drivers and keyboard drivers must be compiled in. If you don't like this, feel free to build initrd in the usual way (putting modules in initrd and rootfs) - as for me, I find that it is very clean to put *all* kernel modules in zdrv. This way, to upgrade kernel is trivial - replace vmlinuz and kernel-modules.sfs with a new one.

Mini-FAQ
----------
1. Q: Got this. How to keep the size down?
A: - Look at /var/lib/dpkg/info; this has the list of installed packages. %remove unnecessary ones.
- Look at rootfs-skeleton/pinstall.sh. This file is run at the end of puppy-base installation; use it to remov unnecessary files

2. Q: I want to build from Slackware (or RPM, or Arch, or packdude, etc)
A: This script only builds from Debian. A similar one can be written for all the above, perhaps we can then write a new front-end that will call these build scripts depending on what distro you use.

3. Q: Many of Puppy utilities don't work!
A: Certainly, because many of the dependent packages are missing. Add them and they *may* work.

4. Q: Puppy base is incompatible with Ubuntu/Debian in many aspects. You missed a lot of the "adaptation" already there in Woof2 scripts to make it work with Ubuntu/Debian base.
A: I think this is not the way to move forward. Rather than adapting Ubuntu/Debian/Slackware/CentOS - whatever parent distro - to Puppy, we should do the other way: adapt Puppy script to run with whatever the parent distro is. This way, we modify as little as possible from the parent distro and thus the rest of the packages from parent distro are more likely to work (which is the reason *why* we want to build from a parent distro).

5. Q: So many commits. What has changed between this and the original Woof-CE?
A: boot/initrd-tree0 - two-line changes, and rootfs-skeleton/pinstall.sh. Everything else is pristine. I do plan to make more changes later, but I want so show that even with plain Puppy base, it works.

This is a work in progress. Suggestions and improvements welcome. Do not expect a Puppy release by me - this tool is for puppy builders and they will be the one releasing puppies, not me.

Enjoy.

EDIT: editorial changes.
EDIT: update - now with jwm menus shown properly, icons shown properly.
EDIT: add Xdialog and gtkdialog for 64-bit builds too.

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread

Last edited by jamesbond on Tue 03 Jun 2014, 12:36; edited 3 times in total
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 2221
Location: The Blue Marble

PostPosted: Tue 03 Jun 2014, 01:58    Post subject:  

Reserved.
_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send private message 
Iguleder


Joined: 11 Aug 2009
Posts: 1922
Location: Israel, somewhere in the beautiful desert

PostPosted: Tue 03 Jun 2014, 02:44    Post subject:  

Cool! Gonna play with this once I finish my current work.
_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
01micko


Joined: 11 Oct 2008
Posts: 7831
Location: qld

PostPosted: Tue 03 Jun 2014, 06:57    Post subject:  

Slacko64 has dpkg and dpkg-deb so I'm trying a 64 build now. Razz (although dpkg is bb version.. dpkg-deb is full).

EDIT: seems to be working, the chroot tree looks sane so far...

EDIT: FAIL.. busybox dpkg can't recognise "--root=" option.

EDIT: lazy me just installed precise dpkg with libselinux1 Razz . I have an sfs

EDIT: booted (on real hardware, nomodeset, and I remind you built on slacko64, ubuntu dpkg, copied gtkdialog & Xdialog straight out of running OS with a hack to make_sfs() and 3 packages out of 273 failed - apart from gtkdialog/Xdialog) straight to desktop. Amazed. I'm having a beer too so PEBKAC is of high probability why keyboard and mouse don't work! I have to add NOX as a param, but I thinks that is failing since BK reworked xorg. I'll try it (booting from grub4dos).

EDIT: pretty much works now except dhcpcd isn't there and saving session is broken. Probably a binary missing to probe partitions or something like that.

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
mavrothal


Joined: 24 Aug 2009
Posts: 1684

PostPosted: Tue 03 Jun 2014, 09:23    Post subject:  

01micko wrote:
I'm having a beer too so PEBKAC is of high probability why keyboard and mouse don't work!

I can testify that beer is not causing the failure of keyboard/mouse Laughing

BTW pinstall is missing the dash in "cp --remove-destination"
also the mksquashfs parameters are not parsed correctly (in Lubuntu 14.04)

_________________
Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too Very Happy
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7831
Location: qld

PostPosted: Tue 03 Jun 2014, 09:25    Post subject:  

mavrothal wrote:
I can testify that beer is not causing the failure of keyboard/mouse Laughing


Actually have it working now.. was PEBKAC so there! Twisted Evil

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
mavrothal


Joined: 24 Aug 2009
Posts: 1684

PostPosted: Tue 03 Jun 2014, 09:26    Post subject:  

01micko wrote:
mavrothal wrote:
I can testify that beer is not causing the failure of keyboard/mouse Laughing


Actually have it working now.. was PEBKAC so there! Twisted Evil

Do tell

_________________
Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too Very Happy
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7831
Location: qld

PostPosted: Tue 03 Jun 2014, 09:49    Post subject:  

Ensure you boot to NOX... I didn't add pfix=nox to my menu.lst and that's why it failed. NOX is broken but once you get back to prompt, delete /etc/X11/xorg.conf and run "xinit" it's all good.. until the next hurdle (I did another quick build and added dhcpcd, dragged in some stuff).

Then apt fails. need to configure /etc/apt/sources.list with a repo.. and damn.. my bandwidth for the month just run out! Taking ages to get the list from aarnet.edu.au. So it might well be tomorrow before I'm running virtualbox on this thing Laughing

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
jamesbond

Joined: 26 Feb 2007
Posts: 2221
Location: The Blue Marble

PostPosted: Tue 03 Jun 2014, 10:40    Post subject:  

Thank you guys for the interest!
mavrothal wrote:
BTW pinstall is missing the dash in "cp --remove-destination"
Ta - fixed.
Quote:
also the mksquashfs parameters are not parsed correctly (in Lubuntu 14.04)
I'm using Xcompression-level 1 to speed up squashing. It's new parameter only available in recently released squashfs-tool 4.3 (kirk found about it). Comment out that parameter and you should be golden (I will comment it out too and the commit it to github).

01micko wrote:
3 packages out of 273 failed

Two of that 3 would probably be xdialog and gtkdialog. I haven't packaged 64-bit xdialog and gtkdialog - don't have slacko64 around handy. Now that I think about it, perhaps I should just take Fatdog's xdialog/gtkdialog and see if the dependencies are satisfied. If it does, I can pack it out.

EDIT: I have now packaged Fatdog's Xdialog and gtkdialog. Fatdog's gtkdialog is older (0.8.3) than Slacko's one (0.8.4).

Quote:
NOX is broken but once you get back to prompt, delete /etc/X11/xorg.conf and run "xinit"

Yes, xwin is "broken" (let's just say, not compatible with the recent Xorg here). I am tempted to replace it with Fatdog's xwin, but that's putting the cart before the horse - since here we are talking about "build system" rather that the puppy-base (if you're talking about the puppy-base, there is ton I'd like to replace Twisted Evil)

Remember, if you want to see familiar jwm menus, please run jwm_menu_create before starting xinit.

Quote:
hen apt fails. need to configure /etc/apt/sources.list with a repo.
Yup - it's not configured yet. I haven't found a reliable way to configure it automatically when you can build from so many sources. I included apt-get mainly to test/show that "apt list" works for packages installed by the build system. I'll think of something.
_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7831
Location: qld

PostPosted: Tue 03 Jun 2014, 16:59    Post subject:  

Just added firefox to my package list

Postiing from it now...

jamesbond wrote:
Two of that 3 would probably be xdialog and gtkdialog. I haven't packaged 64-bit xdialog and gtkdialog - don't have slacko64 around handy. Now that I think about it, perhaps I should just take Fatdog's xdialog/gtkdialog and see if the dependencies are satisfied. If it does, I can pack it out.

No, I accounted for those; with them I had 5 failures. I couldn't figure them out as it went past the buffer of lines in rxvt and I couldn't scroll up. A very simple logging system might be helpful. Besides I haven't much time but I couldn't resist this Rolling Eyes Laughing . I'll be of more use after next Thursday.
shot.jpg
 Description   
 Filesize   85.31 KB
 Viewed   1166 Time(s)

shot.jpg


_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
mavrothal


Joined: 24 Aug 2009
Posts: 1684

PostPosted: Wed 04 Jun 2014, 01:08    Post subject:  

Hi James,
I finally had the chance to look at the code a bit (instead of just use it Embarassed ).
Since you have branched out of master the deb-build.sh ignores woof-CE/woof-code/rootfs-packages/ which is currently in testing. It would be handy to include since there puppy pets, usually from the noarch or common repo and almost ubiquitously used in puppies, can be placed to improve puppy experience when building from deps, rpms etc.
The expected format in rootfs-packages is woof-CE/woof-code/rootfs-packages/package_name/{<tree>,pinstall}. Ideally inclusion of rootfs-packages should be optional (or even package specific) in case someone wants to build with official packages only. Eventually some of the rootfs-skeleton packages (like petget or pup_event) could also be moved to rootfs-packages.
Alternatively, deb-build.sh, could also pull pets (from a respective list), though I think rootfs-packages could be better controlled to be consistent and distro independent.
Of course implementing both would be another option Shocked Very Happy

_________________
Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too Very Happy
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 2221
Location: The Blue Marble

PostPosted: Wed 04 Jun 2014, 03:27    Post subject:  

Updated. deb-build.sh now supports installing from rootfs-packages.

01micko:
- sources used to build the distro now recorded in /etc/apt/sources.list.d, so apt-get works out of the box (you still need to install gnupg) - I tested with apt-get update
- to log output from deb-build.sh, do "./deb-build.sh 2>&1 | tee build.log"

Note:
%puppy renamed to %addbase
to install rootfs-packages, use %addpkg

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7831
Location: qld

PostPosted: Wed 04 Jun 2014, 06:57    Post subject:  

Thanks. Just did an update. The failed packages are:
Code:
Cannot find xorg-input-abi-20.
Cannot find perlapi-5.18.1.
Cannot find xorg-video-abi-15.
Cannot find python3:any.


The last one is for firefox. None (of the missing pkgs) seem to have a detrimental effect.

EDIT: now that apt is working they all instaaled automagically... in no time.

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
jamesbond

Joined: 26 Feb 2007
Posts: 2221
Location: The Blue Marble

PostPosted: Wed 04 Jun 2014, 07:45    Post subject:  

01micko wrote:
Cannot find xorg-input-abi-20.
Cannot find perlapi-5.18.1.
Cannot find xorg-video-abi-15.

Yeah, these ones are odd. They are listed in the database, not no reference how to get them. Perhaps they are in trusty-updates or other.

Quote:
Cannot find python3:any.
Apparently this is a new format on dpkg format. I should strip anything after a colon ... lemme check.

Anyway, just pushed an update. Apt-get now works out of the box if you include the apt-database (WITH_APT_DB=1 ./deb-build.sh). If not, when running, you need to "apt-get update" first. It's good enough for me to be able to install firefox through it. Synaptic, unfortunately, requires gtk3 Evil or Very Mad

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send private message 
Iguleder


Joined: 11 Aug 2009
Posts: 1922
Location: Israel, somewhere in the beautiful desert

PostPosted: Fri 06 Jun 2014, 02:10    Post subject:  

Looks good. I really wonder how big it is with all Puppy applications, before cleanup.

Also, rootfs-skeleton is a mess. It clutters the main SFS with so many files.

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
Display posts from previous:   Sort by:   
Page 1 of 8 [109 Posts]   Goto page: 1, 2, 3, ..., 6, 7, 8 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1153s ][ Queries: 12 (0.0082s) ][ GZIP on ]