Author Topic: /usr/local/... Or /usr/... For .ipk Structure ?  (Read 6642 times)

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
/usr/local/... Or /usr/... For .ipk Structure ?
« Reply #15 on: April 28, 2007, 07:25:06 am »
ahh, sorry the majic with ls flags is if you want a listing of all the files, may come in handy esp. if you installed to a live system and want all the files you need to delete
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware

telemetric_au

  • Sr. Member
  • ****
  • Posts: 327
    • View Profile
    • http://www.tyrannozaurus.com/feed/contribs/telemetric/index.htm
/usr/local/... Or /usr/... For .ipk Structure ?
« Reply #16 on: May 10, 2007, 04:01:21 am »
Quote
I when first started packaging stuff I used "/usr", but then when I found that there is no easy and consistent way to tell "make install" to put files into a specific directory. This made things tricky since I didn't want "make install" to install into my live system but rather to a directory eg "/home/me/temp-ipkg/usr", where I can review the files installed (maybe removing stuff that aren't needed like docs, manpages, etc) then run mkipkg on it. The only consistent way to force installation to a specific directory was to remount the destination directory that "make install" uses, but the big problem with this method is that if you remount "/usr" onto "/home/me/temp-ipkg/usr" then if "make install" needed to use any programs or libraries/headers that were under "/usr" they're not available anymore and hence fails. This becomes less of a problem if you use "/usr/local" because "make install" would be less likely to need any of the stuff in there.

Anyway after a while I learned that I could edit the Makefile and manually add a prefix to the installation directories and hence install to anywhere I choose without having to do the remount stuff. But the habit of "/usr/local" stuck
[div align=\"right\"][a href=\"index.php?act=findpost&pid=159880\"][{POST_SNAPBACK}][/a][/div]


well i get some more of why i find this post usefull... basically ivebeen using the --prefix=DESTDIR, then packaging that up, installing it from reultant ipk and then removing the compiled source directory...

but things havent been compilnig so sweetly and i worked out why... now ive got the programs with prefix references inside them to onld locations, and they are passing that onto my compiling app when it asks for it... so then it looks there and it aint there no more... so im thinking i need to change my approach and recompile all my apps
Collie w/ pdaxrom & Puppy OS w/ cross-sdk
Hawking HCF686TX 10/100, Ambicom 802.11b (WL1100C-CF), Xircom 56K Global CF
Kingston CF Elite Pro & SD 1Gb & 128mb for flashing
$2 screen protector, collie.pdaxrom.feed : my collie pdaxrom site

telemetric_au

  • Sr. Member
  • ****
  • Posts: 327
    • View Profile
    • http://www.tyrannozaurus.com/feed/contribs/telemetric/index.htm
/usr/local/... Or /usr/... For .ipk Structure ?
« Reply #17 on: May 10, 2007, 04:09:56 am »
ps, how what changed do you make to the Makefile ??
Collie w/ pdaxrom & Puppy OS w/ cross-sdk
Hawking HCF686TX 10/100, Ambicom 802.11b (WL1100C-CF), Xircom 56K Global CF
Kingston CF Elite Pro & SD 1Gb & 128mb for flashing
$2 screen protector, collie.pdaxrom.feed : my collie pdaxrom site

desertrat

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
    • http://
/usr/local/... Or /usr/... For .ipk Structure ?
« Reply #18 on: May 10, 2007, 04:41:02 am »
Quote
but things havent been compilnig so sweetly and i worked out why... now ive got the programs with prefix references inside them to onld locations, and they are passing that onto my compiling app when it asks for it... so then it looks there and it aint there no more...
That is the problem that my post (#15) talks about

Quote
ps, how what changed do you make to the Makefile ??
Search the Makefile for the "install:" section. An example for qbedic:

Code: [Select]
install: $(TARGET)
        install $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(APPLICATION)

Example for zlib here:
https://www.oesf.org/forums/index.php?showt...ndpost&p=160653
« Last Edit: May 10, 2007, 04:46:12 am by desertrat »
SL-C3100 / Ambicon WL1100C-CF / pdaXrom 1.1.0beta3 / IceWM

telemetric_au

  • Sr. Member
  • ****
  • Posts: 327
    • View Profile
    • http://www.tyrannozaurus.com/feed/contribs/telemetric/index.htm
/usr/local/... Or /usr/... For .ipk Structure ?
« Reply #19 on: May 10, 2007, 05:29:47 am »
ill look into this more, ive just been having some good success using the make DESTDIR=... install, ive recompiled most my apps, and its working well. i ahve heard of reports of it not working with all apps though...

i did have a go at mounting usr/local but what is the command to mount a directory rather than a block device ??

also in summary of the question of this thread, id say i have to prefer /usr/local, as i started out think usr for some time because it meant less typing for one thing !! but now i like /usr/local more as  most apps install with that as "prefix" by default, and lets you keep/see your own additions seperate to what ever came with your OS/ROM .
Collie w/ pdaxrom & Puppy OS w/ cross-sdk
Hawking HCF686TX 10/100, Ambicom 802.11b (WL1100C-CF), Xircom 56K Global CF
Kingston CF Elite Pro & SD 1Gb & 128mb for flashing
$2 screen protector, collie.pdaxrom.feed : my collie pdaxrom site

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
/usr/local/... Or /usr/... For .ipk Structure ?
« Reply #20 on: May 10, 2007, 07:06:32 am »
which is what it was intended for
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
/usr/local/... Or /usr/... For .ipk Structure ?
« Reply #21 on: May 10, 2007, 08:53:07 am »
On pretty much every unix-like platform I've used, /usr is for apps installed from packages (and which can be likewise uninstalled) and /usr/local is for the messy stuff you compiled and installed yourself.

Since most people don't bother packaging things up, sources generally default to /usr/local. But just because that's the default doesn't mean that's what you should use for a package!

I know I'd be displeased if a self-compiled app installed itself in /usr, and I'd be equally displeased if I installed a package and it went into /usr/local! I know I'm not going to break packages if I do anything manually under /usr/local. And I know not to do anything manually under /usr for the same reason. Mixing them up is bad practice.
SL-C3100 with usb power mod running debian eabi
pdaXii13 still on the NAND for dualbooting
16GB SDHC! (a new one, after I sat on the old one and it went kaput)
D-Link 660 wifi, Socket Bluetooth rev H
External 9800mAh LiIon battery and slimline dvd drive
Homebrew microphone and remote

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
/usr/local/... Or /usr/... For .ipk Structure ?
« Reply #22 on: May 11, 2007, 04:36:19 am »
what you want is a bind mount, it binds one dir to another. be gareful with it as wierd things can happen (gentoo install, dont ask)

mount -o bind <real> <new>, where <new> is a copy of <real>
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware

telemetric_au

  • Sr. Member
  • ****
  • Posts: 327
    • View Profile
    • http://www.tyrannozaurus.com/feed/contribs/telemetric/index.htm
/usr/local/... Or /usr/... For .ipk Structure ?
« Reply #23 on: May 11, 2007, 07:34:28 am »
Quote
what you want is a bind mount, it binds one dir to another. be gareful with it as wierd things can happen (gentoo install, dont ask)

mount -o bind <real> <new>, where <new> is a copy of <real>
[div align=\"right\"][a href=\"index.php?act=findpost&pid=161033\"][{POST_SNAPBACK}][/a][/div]

ah nice .... this feels very smooth and sleek, i understand the possible problem of missing "system" binaries  though.

but its still a great option. especially when you app doesnt listen to DESTDIR as ive recently been runnning into...


i can also se how things could get interesting if you ended up with an indirect loop say through other "mount's" as well


though one problems ive been running into with this is that the base generic directory structure is missing and causes install error... not big issue though
Collie w/ pdaxrom & Puppy OS w/ cross-sdk
Hawking HCF686TX 10/100, Ambicom 802.11b (WL1100C-CF), Xircom 56K Global CF
Kingston CF Elite Pro & SD 1Gb & 128mb for flashing
$2 screen protector, collie.pdaxrom.feed : my collie pdaxrom site

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
/usr/local/... Or /usr/... For .ipk Structure ?
« Reply #24 on: May 12, 2007, 04:14:50 am »
actually the probelm i had was with /dev mounted as a tmpfs and proc

basically i unmounted them in the chroot and it did wierd things, not to mention the /proc and /chroot/proc were compleattly diffrent (caused me alot off confision)
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware