My online notes on using slackbuild

Non release banter
Post Reply
aus9

My online notes on using slackbuild

Post#1 by aus9 » 27 Oct 2015, 14:34

Hi

I am intermediate Linux user heading towards 60 yrs and am good looking blonde :D
So if I have any blonde moments feel free to let me know.

But my skills with Porteus and Slackware are basic. I thought I would share my first attempts to use a slackbuild to build a TXZ and a little of my intentions. Firstly openssl currently has sslv3 support and I prefer it doesn't. I plan to build a v 1.0.2d but first I have to learn how to use a slackbuild by re-creating an existing package.

The following is my experience so far....no need to read unless you are like minded or have time to offer comments etc.

slackware URLs
###############
http://mirror.internode.on.net/pub/slac ... rtwatch.gz
http://mirror.internode.on.net/pub/slac ... openssl.gz
http://mirror.internode.on.net/pub/slac ... SlackBuild
http://mirror.internode.on.net/pub/slac ... .1e.tar.gz
http://mirror.internode.on.net/pub/slac ... sc.openssl
http://mirror.internode.on.net/pub/slac ... me.diff.gz
############################
Next one is not for building but comparing the build to a real package
http://mirror.internode.on.net/pub/slac ... 6_64-1.txz


first run for the slackbuild has this error

Code: Select all

snip....... Expected text after =item, not a number solved
Internet search reveals this is a known issue.
The build actually mentions the parallel issue but its fix is commented out, lines 48+9
Internet says downgrade of perl to 5.16 or patch

I have perl-5.18.1-x86_64-1.txz was found in slackware [installed]

try patches
############
http://www.linuxfromscratch.org/patches ... ax-1.patch
http://www.linuxfromscratch.org/patches ... es-1.patch
http://www.linuxfromscratch.org/patches ... ld-1.patch


unpack first five URLs at /tmp and also have all 3 patches at /tmp

Code: Select all

cd openssl-1.0.1e
patch -Np1 -i ../openssl-1.0.1e-fix_parallel_build-1.patch 
patch -Np1 -i ../openssl-1.0.1e-fix_pod_syntax-1.patch 
patch -Np1 -i ../openssl-1.0.1e-fix_manpages-1.patch
The build will attempt to clean up old entries and unpack again. To keep my patched unpack, I mod slackbuild
line 55 stop the removal of the unpack
line 57 I comment out....tar xvf $CWD/openssl-$VERSION.tar.gz || exit 1

Now the build
###############

Code: Select all

./openssl.SlackBuild

Most of it works as expected with the following errors or comments

Code: Select all

WARNING:  zero length file etc/cron.daily/certwatch.new

Slackware package /tmp/openssl-1.0.1e-x86_64-1.txz created.

gzip: /tmp/doinst.sh-openssl-solibs.gz: No such file or directory
cat: /tmp/slack-desc.openssl-solibs: No such file or directory

Slackware package maker, version 3.14159.

Searching for symbolic links:

No symbolic links were found, so we won't make an installation script.
You can make your own later in ./install/doinst.sh and rebuild the
package if you like.

This next step is optional - you can set the directories in your package
to some sane permissions. If any of the directories in your package have
special permissions, then DO NOT reset them here!

Would you like to reset all directory permissions to 755 (drwxr-xr-x) and
directory ownerships to root.root ([y]es, [n]o)? n

Creating Slackware package:  /tmp/openssl-solibs-1.0.1e-x86_64-1.txz

WARNING:  zero length file install/doinst.sh
WARNING:  zero length file install/slack-desc

Slackware package /tmp/openssl-solibs-1.0.1e-x86_64-1.txz created.
Now lets peek inside the folder that was used to make the slack package.

1 etc/cron.daily will need the certwatch injected.
2 etc/ssl has openssl.cnf.new not dropping the .new wrong! install script expects to find the file with .new
3 install/doinst.sh is larger than the download ...see below
4 install/slack-desc is same as download but contains the measure tape
----and is supposed to be only eleven lines....needs fixing
5 lib64 has 2 shared object files already stripped and executable
6 usr/bin/openssl already stripped and executable other file also OK
7 usr/doc exists appears same as download package
8 usr/include headers look OK
9 usr/lib64/engines shared objects already stripped and executable
10 usr/lib64/pkgconfig looks OK
11 usr/lib64 for real....has more sym links so doinst.sh postinstall script needs to work later
12 usr/man manpages are gunzipped looks OK

* (3) AFAIK I should not expect (5) to be correct as I have not installed the package
time will tell.

EDIT I forgot to mention that I ran this script as root so the code box is an automatic output, was not an interactive output,
but the ownership appears good as root:root.

edit forgot to add soname.diff.gz to URL section now fixed
Last edited by aus9 on 28 Oct 2015, 09:01, edited 4 times in total.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2522
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: My online notes on using slackbuild

Post#2 by Bogomips » 27 Oct 2015, 17:53

@aus9
Thanks for sharing. Managed to steer clear of builds and makes here. Doing make or build always a bit of a bind. Too much red tape for my liking. Last venture in this direction was compiling different kernels while under Kanotix. Anyway If would have to do a slackbuild would be able to fall back on this post for reference. :beer:
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

aus9

Re: My online notes on using slackbuild

Post#3 by aus9 » 27 Oct 2015, 22:38

no worries. At this stage I won't edit first post and continue my notes. This post will be editted a number a times until I get it right. To start the fixes I propose to append this code to end of build script. I am already at /tmp when I run this script. Append means code I plan on injecting into the slackbuild script at the bottom of the script. I am aware I need to prepend my wget commands for the patches etc but that can wait a while.

Code: Select all

rm -rf *.txz
deletes 2 TXZs

append

Code: Select all

rm -rf package-openssl/install/slack-desc
cat > package-openssl/install/slack-desc << EOF
openssl: openssl (Secure Sockets Layer toolkit)
openssl:
openssl: The OpenSSL certificate management tool and the shared libraries that
openssl: provide various encryption and decryption algorithms and protocols.
openssl:
openssl: This product includes software developed by the OpenSSL Project for
openssl: use in the OpenSSL Toolkit (http://www.openssl.org).  This product
openssl: includes cryptographic software written by Eric Young
openssl: (eay@cryptsoft.com).  This product includes software written by Tim
openssl: Hudson (tjh@cryptsoft.com).
openssl:
EOF
chmod 644 package-openssl/install/slack-desc
where package-openssl is the name of the created folder (directory) done by the build script

Just checked the built config file versus the real one thats installed in my system they are the same

Code: Select all

md5sum *
ce31ab5015842bf7c2939514a634e0e4  openssl.cnf
ce31ab5015842bf7c2939514a634e0e4  openssl.cnf.new
but install script expects to use openssl.cnf.new, so no changes here

Just checked the certwatch at /tmp and renamed the one in my installed system to append sys to compare them
but install script expects to use certwatch.new so no changes here.

I have renamed script as openssl.PBuild and its starting to look OK

I am not suggesting this resolves all of the 1.0.1e build so won't append a new txz command at this stage.
script won't use a txz2xzm, I will do that manually at this stage.

Just seen my first install errors so edit first and this post to resolve the openssl.cnf and certwatch file

aus9

Re: My online notes on using slackbuild

Post#4 by aus9 » 28 Oct 2015, 09:27

first success more testing and then posting in the correct forum with a package to share

Code: Select all

txz2xzm openssl-1.0.1e-x86_64-1.txz
Verifying package openssl-1.0.1e-x86_64-1.txz.
Installing package openssl-1.0.1e-x86_64-1.txz:
PACKAGE DESCRIPTION:
# openssl (Secure Sockets Layer toolkit)
#
# The OpenSSL certificate management tool and the shared libraries that
# provide various encryption and decryption algorithms and protocols.
#
# This product includes software developed by the OpenSSL Project for
# use in the OpenSSL Toolkit (http://www.openssl.org).  This product
# includes cryptographic software written by Eric Young
# (eay@cryptsoft.com).  This product includes software written by Tim
# Hudson (tjh@cryptsoft.com).
#  
Executing install script for openssl-1.0.1e-x86_64-1.txz.
Package openssl-1.0.1e-x86_64-1.txz installed.

Creating /tmp/openssl-1.0.1e-x86_64-1.xzm
I will use the script with a different tarball as mentioned in first post

I just unpacked the xzm and it converts the certwartch to remove .new
converts openssl.cnf to strip .new
and created the /var/log/packages/filename
and created the /var/log/scripts/filename
-----that is wonderful!

:Bravo:

aus9

Re: My online notes on using slackbuild

Post#5 by aus9 » 29 Oct 2015, 05:13

Now moved to tarball v 1.0.2d

But my lack of knowledge of Porteus has led me into some issues with old package remmants.
I am looking into it over the next few days. I know how to deactivate and activate modules.

so far discovered I need to watch for old files in
(mount pt) porteus/changes

/var/log/scripts
/var/log/packages

Post Reply