Specifying and Installing Minimalist UbuntuMATE

FYI - Looking at choice of technologies to implement User-driven checklist-based post-install selection of Applications, by function/category and by name.

I've highlighted this entire "project" on the Ubuntu Discourse site.

2 Likes

Provisioning script (one of many to come) ...

For

  • Handling of APT Recommends as Dependencies

Name:       provision_PackageRecommendsAsDepends.sh

#!/bin/sh

########################################################################################
########	RECOMMENDS	RECOMMENDS	RECOMMENDS	RECOMMENDS	########
########################################################################################

###
###	Controlling APT handling of Recommends specifications
###


###
###	APT service behaviour configuration directory
###
aptConfDir="/etc/apt/apt.conf.d"

if [ -s "${aptConfDir}" ]
then
	ls -ld "${aptConfDir}" | awk '{ printf("\t | %s\n", $0 ) ; }'
else
	echo "\n MISSING:  Unable to locate expected APT configuration directory '${aptConfDir}'.  Unable to proceed!\n" ; exit 1
fi


###
###	APT service customizations capture/tracking directory
###
aptCustomConf="${aptConfDir}/OasisMaxi/"
if [ ! -d "${aptCustomConf}" ]
then
	mkdir "${aptCustomConf}" 
	chown root:root "${aptCustomConf}" 
	chmod 755 "${aptCustomConf}"
	echo "\n Created directory '${aptCustomConf}' ..."
fi

if [ -s "${aptCustomConf}" ]
then
	ls -ld "${aptCustomConf}" | awk '{ printf("\t | %s\n", $0 ) ; }'
else
	echo "\n MISSING:  Unable to locate/create expected APT configuration directory '${aptCustomConf}'.  Unable to proceed!\n" ; exit 1
fi


###
###	User input for choice of behaviour - Recommends as Dependencies
###
# Display the YAD dialog and capture the exit code
	#--image="" \
	#--form \
	#--buttons-layout="center" \
yad	\
	--geometry="600x130" \
	--image="dialog-question" \
	--title="Handling Recommends as Dependencies" \
	--text-align="center" \
	--text="\n\nDo you choose to enable 'Recommends'?" \
	--button="Enable!gtk-yes:0" \
	--button="Disable!gtk-no:1"	; mode=$?

# Check the exit code using a case statement
case ${mode} in
	0 | 1 ) ;;
	#Dialog closed unexpectedly or by pressing ESC (exit code $mode)
	*) mode=1 ;;
esac


###
###	Transforming choice into APT behaviour directive
###
if [ ${mode} -eq 1 ]
then
	echo "\n Disabling install recommends as dependencies ..."

	aptRecommends="/etc/apt/apt.conf.d/99install-recommends"
	echo "APT::Install-Recommends \"false\";" >"${aptRecommends}"
	cp -p "${aptRecommends}" "${aptCustomConf}"
else
	echo "\n Enabling install recommends as dependencies ..."

	aptRecommends="/etc/apt/apt.conf.d/99install-recommends"
	echo "APT::Install-Recommends \"true\";" >"${aptRecommends}"
	cp -p "${aptRecommends}" "${aptCustomConf}"
fi
1 Like

Provisioning script for

  • defining Vendor's repo source for Debian style package handling

NAME:       provision_VendorRepoPkg_Deb.sh

#!/bin/sh

###
###	Script to create configuration file which identifies 
###	a vendor-originating Debian-style repository 
###	from which that vendor's packages will be retrieved.
###

mode=0
tval=0

if [ "$1" = "--test" ]
then
	mode=1
	shift

	if [ $# -eq 0 ]
	then
		tval=1
	fi
fi

if [ $# -eq 5 ]
then
	vendorRepoDebPkgSrc="{1}"
	vendorRepoDebPkgURL="{2}"
	vendorSuite="{3}"
	vendorRepoDebPkgBranch="{4}"
	vendorKeyRingShared="{5}"
else
	echo "\n ERROR: Parameter count does not match expectations.  Unable to proceed.\n" ; exit 1
fi

###
###	IMPORTED VARIABLES
###

if [ ${mode} -eq 1 ]
then
	echo "\n\t assigning test values to generate sample output ..."

	if [ ${tval} -eq 0 ]
	then
		vendorRepoDebPkgSrc="/etc/apt/sources.list.d/mozilla.sources__TEST"
		vendorRepoDebPkgURL="https://packages.mozilla.org/apt__TEST"
		vendorSuite="mozilla__TEST"
		vendorRepoDebPkgBranch="main__TEST"
		vendorKeyRingShared="packages.mozilla.org.asc__TEST"
	else
		vendorRepoDebPkgSrc="{vendorRepoDebPkgSrc}__TEST"
		vendorRepoDebPkgURL="{vendorRepoDebPkgURL}__TEST"
		vendorSuite="{vendorSuite}__TEST"
		vendorRepoDebPkgBranch="{vendorRepoDebPkgBranch}__TEST"
		vendorKeyRingShared="{vendorKeyRingShared}__TEST"
	fi

	echo "\t vendorRepoDebPkgSrc    = '${vendorRepoDebPkgSrc}' ..."
	echo "\t vendorRepoDebPkgURL    = '${vendorRepoDebPkgURL}' ..."
	echo "\t vendorSuite            = '${vendorSuite}' ..."
	echo "\t vendorRepoDebPkgBranch = '${vendorRepoDebPkgBranch}' ..."
	echo "\t vendorKeyRingShared    = '${vendorKeyRingShared}' ..."
fi


########################################################################################
########	PARAMS		PARAMS		PARAMS		PARAMS		########
########################################################################################


###
###	Shared Parameters
###
keyRingDir="/etc/apt/keyrings"


###
###	Vendor-Specific Shared Parameters
###
keyring="${keyRingDir}/${vendorKeyRingShared}"


###
###	Vendor-Specific Package-Specific Parameters
###
	# none a this time


########################################################################################
########	FUNCTION	FUNCTION	FUNCTION	FUNCTION	########
########################################################################################

debPkgVendorRepoSrc()
{
	echo "\
Types: deb
URIs: ${vendorRepoDebPkgURL}
Suites: ${vendorSuite}
Components: ${vendorRepoDebPkgBranch}
Signed-By: ${keyring}"
}

debPkgVendorRepoShow()
{	echo ""
	awk '{ printf("\t | %s\n", $0 ) ; }' <"${vendorRepoDebPkgSrc}"
	echo ""
	ls -l "${vendorRepoDebPkgSrc}" | awk '{ printf("\t | %s\n", $0 ) ; }'
}


########################################################################################
########	APPLY		APPLY		APPLY		APPLY		########
########################################################################################

###
echo "\n Settings defining APT repository for origin of Debian-based package format for applications:"
###

if [ -s "${vendorRepoDebPkgSrc}" ]
then
	debPkgVendorRepoShow

	echo "\n\t Use as is [y] ... or Reject and Rebuild [N] ? => \c" ; read ans
	test -n "${ans}" || { ans="N" ; }

	case "${ans}" in
		y* | Y* )
			echo "\t APT 'source repository specification' was retained ..." ;;
		* )	mv "${vendorRepoDebPkgSrc}" "${vendorRepoDebPkgSrc}.PREV" ;
			debPkgVendorRepoSrc >"${vendorRepoDebPkgSrc}" ;
			debPkgVendorRepoShow ;
			echo "\n\t REPLACED!"
			;;
	esac
else
	debPkgVendorRepoSrc >"${vendorRepoDebPkgSrc}" ;
	debPkgVendorRepoShow ;
	echo "\n\t CREATED!"
fi

if [ ${mode} -eq 1 ]
then
	test -s "${vendorRepoDebPkgSrc}"      && rm -iv "${vendorRepoDebPkgSrc}"
else
	test -s "${vendorRepoDebPkgSrc}.PREV" && rm -iv "${vendorRepoDebPkgSrc}.PREV"
fi
1 Like

You might want add this to the list software-properties-gtk as Software&Updates is gone from Ubuntu but will still be in the repos. Most flavors will keep it but...

1 Like