etc:10-lpm-on-xubuntu
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| etc:10-lpm-on-xubuntu [2022/05/09 18:17] – wikiadmin | etc:10-lpm-on-xubuntu [2022/05/09 21:37] (current) – wikiadmin | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| In order to build and install lpm on an Xubuntu System, proceed as follows: | In order to build and install lpm on an Xubuntu System, proceed as follows: | ||
| - | ====== | + | ===== Needed packages ===== |
| + | |||
| + | In order to retrieve and build the current lpm source code, you will need to first install the following packages: | ||
| + | |||
| + | * gcc: the gnu C compiler | ||
| + | * make: gnu make | ||
| + | * flex: flex | ||
| + | * libssl-dev: openssl development | ||
| + | * zlib1g-dev: zlib development | ||
| + | * libarchive-dev: | ||
| + | * libcurl4-openssl-dev: | ||
| + | * libfltk1.3-dev: | ||
| + | * yad: yad, gui dialogs, for fltk gui | ||
| + | * libfl-dev: flex library | ||
| + | |||
| + | All these can easily be installed in a terminal with: | ||
| + | |||
| + | < | ||
| + | sudo apt-get install $PACKAGE_NAME | ||
| + | |||
| + | </ | ||
| + | |||
| + | ===== ===== | ||
| + | |||
| + | ===== Retrieve source code ===== | ||
| + | |||
| + | The source code can be obtained via git the following way: | ||
| + | |||
| + | < | ||
| + | git clone http:// | ||
| + | cd lpm/src | ||
| + | git clone http:// | ||
| + | |||
| + | </ | ||
| + | |||
| + | ===== Building lpm ===== | ||
| + | |||
| + | In order to prepare the source code to build, there is a configure script. It is not based on autotools, but just a shell script. Apart from telling it the install locations, an admin group has to be specified, whose members are allowed to install and update packages. The setuid program / | ||
| + | |||
| + | In order to setup lpm for installling to standard locations and require users of the gui to be in group adm, call configure (in lpm/src) as follows: | ||
| + | |||
| + | < | ||
| + | ./configure --prefix=/ | ||
| + | |||
| + | </ | ||
| + | |||
| + | If no pgroup is specified, wheel will be used, but as this group does not exist under xubuntu, adm or sudo are the best choices. | ||
| + | |||
| + | lpm can then be built by calling: | ||
| + | |||
| + | < | ||
| + | make | ||
| + | |||
| + | </ | ||
| + | |||
| + | Before actually installing all the programs and scripts, you might want to check what would be installed, like this: | ||
| + | |||
| + | < | ||
| + | make DESTDIR=`pwd`/ | ||
| + | find lpm-dest | ||
| + | |||
| + | </ | ||
| + | |||
| + | If you think this will not break your system, you can then install lpm by: | ||
| + | |||
| + | < | ||
| + | sudo make install | ||
| + | |||
| + | </ | ||
| + | |||
| + | In order to build the fltk-based gui, just go to the subdir fltk and type: | ||
| + | |||
| + | < | ||
| + | make | ||
| + | sudo make install | ||
| + | |||
| + | </ | ||
| + | |||
| + | Of course, the above DESTDIR check can be done here, too. | ||
| + | |||
| + | ===== Initializing the lpm package repository ===== | ||
| + | |||
| + | After having installed the programs, you then have to initialize lpm's repository. Furthermore, | ||
| + | |||
| + | First, initialize lpm's local package repository as root, by the following command: | ||
| + | |||
| + | < | ||
| + | lpm-adm -B -o dist_name=Xubuntu, | ||
| + | |||
| + | </ | ||
| + | |||
| + | This will initialize the repository under / | ||
| + | |||
| + | The next step then is to setup your package signing certificate and key and export it for registering in lpm. | ||
| + | |||
| + | As the user who will create packages (not root!), call | ||
| + | |||
| + | < | ||
| + | lpk-gen -K | ||
| + | |||
| + | </ | ||
| + | |||
| + | You will then be asked for your name and email address, and a password to protect the private key. This key and certificate will then be used to sign any packages by **lpk-gen**, | ||
| + | |||
| + | < | ||
| + | cd ~/.lpm | ||
| + | mv lpk-gen.key lpk-gen.enc | ||
| + | openssl rsa -in lpk-gen.enc -out lpk-gen.key | ||
| + | |||
| + | </ | ||
| + | |||
| + | This will then prompt you once for the key's password and then store the key unencrypted. | ||
| + | |||
| + | To export your certificate for registration in lpm, call | ||
| + | |||
| + | < | ||
| + | lpk-gen -X | ||
| + | |||
| + | </ | ||
| + | |||
| + | This will then export the certificate as a file in the local directory, and tell you the name of the file, e.g. $CERTHASH.crt . You can then register it in lpm by calling: | ||
| + | |||
| + | < | ||
| + | sudo lpm-key -A $CERTHASH.crt | ||
| + | |||
| + | </ | ||
| + | |||
| + | ===== Setting up the sample wnb packages | ||
| + | |||
| + | In order to test the functionality of lpm, the subdirectory " | ||
| + | |||
| + | For this, find out the full path of the directory and then, as root, type: | ||
| + | |||
| + | < | ||
| + | echo / | ||
| + | |||
| + | </ | ||
| + | |||
| + | You can then leave root and go back to the direcory, and create the packages by typing: | ||
| + | |||
| + | < | ||
| + | ./ | ||
| + | |||
| + | </ | ||
| + | |||
| + | This will produce some output and then should have created some some packages with the suffix .lpk | ||
| + | |||
| + | If eveything is fine, you can then list the available packages for installation by calling: | ||
| + | |||
| + | < | ||
| + | lpm -S | ||
| + | |||
| + | </ | ||
| + | |||
| + | In order to then install the package " | ||
| + | |||
| + | < | ||
| + | sudo lpm -I beer | ||
| + | |||
| + | </ | ||
| + | |||
| + | You can then also check the gui (xlpm), which should show you the same stuff. | ||
| + | |||
| + | In order to create newer versions of the package (so you can check the update functionality), | ||
etc/10-lpm-on-xubuntu.1652113026.txt.gz · Last modified: by wikiadmin
