-# This file can be used for testing setup-ivi-* scripts. This file corresponds
+# This file can be used for testing setup-scripts-* scripts. This file corresponds
# to an EFI boot image (boot partition has the EFS type GUID). Do the following
# to start debugging
#
# mkdir /tmp/boot
-# touch /tmp/boot/vmlinuz-3.12-x86-ivi
+# touch /tmp/boot/vmlinuz-*
# mkdir -p /tmp/usr/lib/gummiboot
# touch /tmp/usr/lib/gummiboot/gummibootia32.efi
# mkdir /tmp/etc
# Author: Artem Bityutskiy
# License: GPLv2
-# This file contains common functions for setup-ivi-* programs
+# This file contains common functions for setup-scripts-* programs
# Own name
__PROG="${PROG:-installerfw-sh-functions}"
-# This file can be used for testing setup-ivi-* scripts. This file corresponds
+# This file can be used for testing setup-scripts-* scripts. This file corresponds
# to an MBR boot image. Do the following to start debugging:
#
# mkdir /tmp/boot
-# touch /tmp/boot/vmlinux-3.12-x86-ivi
+# touch /tmp/boot/vmlinux-*
# mkdir -p /tmp/usr/share/syslinux/
# touch /tmp/usr/share/syslinux/gptmbr.bin
# mkdir /tmp/etc
+++ /dev/null
-Name: setup-ivi
-Version: 1.1
-Release: 0
-License: GPL-2.0
-Summary: Various early setup programs
-Url: http://www.tizen.org
-Group: System/Configuration
-Source: %{name}_%{version}.tar.gz
-Requires: /usr/bin/sed
-Requires: /usr/bin/grep
-Requires: /usr/bin/printf
-Requires: /usr/bin/printenv
-Requires: /usr/bin/sort
-Requires: /usr/bin/tr
-Requires: virtual-setup-ivi-bootloader
-BuildArchitectures: noarch
-
-%package -n setup-gummiboot
-Summary: Command-line tool for tweaking gummiboot configuration
-Provides: virtual-setup-ivi-bootloader
-Requires: %{name}
-Requires: gummiboot
-
-%package -n setup-extlinux
-Summary: Command-line tool for tweaking extlinux configuration
-Provides: virtual-setup-ivi-bootloader
-Requires: %{name}
-Requires: syslinux-extlinux
-
-%package -n setup-ivi-clone
-Summary: A tool for cloning a Tizen IVI system
-Requires: %{name}
-Requires: /usr/bin/mount
-Requires: /usr/bin/udevadm
-Requires: /usr/bin/uuidgen
-Requires: /usr/bin/sync
-Requires: /usr/bin/tail
-Requires: systemd
-Requires: gptfdisk
-Requires: e2fsprogs
-Requires: dosfstools
-Requires: rsync
-
-%description
-This package provides various early system setup programs
-
-%description -n setup-gummiboot
-This package provides a command-line tool for changing the gummiboot bootloader
-configuration files.
-
-%description -n setup-extlinux
-This package provides a command-line tool for changing the extlinux bootloader
-configuration file.
-
-%description -n setup-ivi-clone
-This package provides a command line tool for cloning a Tizen IVI system to a
-different disk.
-
-###
-### PREP
-###
-%prep
-%setup -q -n %{name}-%{version}
-
-%build
-
-###
-### INSTALL
-###
-%install
-install -d %{buildroot}/%{_sbindir}
-install -d %{buildroot}/%{_prefix}/share/setup-ivi
-install -d %{buildroot}/%{_unitdir}
-
-install -m755 setup-ivi-boot %{buildroot}/%{_sbindir}
-install -m755 setup-ivi-fstab %{buildroot}/%{_sbindir}
-install -m755 setup-ivi-bootloader-conf %{buildroot}/%{_sbindir}
-install -m755 setup-ivi-clone %{buildroot}/%{_sbindir}
-install -m755 setup-ivi-clone-service %{buildroot}/%{_sbindir}
-install -m644 ivi-clone.service %{buildroot}/%{_unitdir}
-install -m755 setup-gummiboot-conf %{buildroot}/%{_sbindir}
-install -m755 setup-extlinux-conf %{buildroot}/%{_sbindir}
-install -m644 setup-ivi-sh-functions %{buildroot}/%{_prefix}/share/setup-ivi
-install -m644 installerfw-sh-functions %{buildroot}/%{_prefix}/share/setup-ivi
-
-###
-### CLEAN
-###
-%clean
-rm -rf %{buildroot}
-
-###
-### FILES
-###
-%files
-%defattr(-,root,root)
-%{_sbindir}/setup-ivi-boot
-%{_sbindir}/setup-ivi-fstab
-%{_sbindir}/setup-ivi-bootloader-conf
-%{_prefix}/share/setup-ivi/setup-ivi-sh-functions
-%{_prefix}/share/setup-ivi/installerfw-sh-functions
-
-%files -n setup-gummiboot
-%defattr(-,root,root)
-%{_sbindir}/setup-gummiboot-conf
-
-%files -n setup-extlinux
-%defattr(-,root,root)
-%{_sbindir}/setup-extlinux-conf
-
-%files -n setup-ivi-clone
-%defattr(-,root,root)
-%{_sbindir}/setup-ivi-clone
-%{_sbindir}/setup-ivi-clone-service
-# Note, we do not need to run 'systemctl enable ivi-clone' for this one because
-# it is activated by the 'systemd.unit=ivi-clone.service' kernel parameter.
-%{_unitdir}/ivi-clone.service
--- /dev/null
+Name: setup-scripts
+Version: 1.1
+Release: 0
+License: GPL-2.0
+Summary: Various early setup programs
+Url: http://www.tizen.org
+Group: System/Configuration
+Source: %{name}_%{version}.tar.gz
+Provides: setup-ivi = %{version}-%{release}
+Obsoletes: setup-ivi < %{version}-%{release}
+Requires: /usr/bin/sed
+Requires: /usr/bin/grep
+Requires: /usr/bin/printf
+Requires: /usr/bin/printenv
+Requires: /usr/bin/sort
+Requires: /usr/bin/tr
+Requires: virtual-setup-scripts-bootloader
+BuildArchitectures: noarch
+
+%package -n %{name}-gummiboot
+Summary: Command-line tool for tweaking gummiboot configuration
+Provides: virtual-%{name}-bootloader
+Requires: %{name} = %{version}-%{release}
+Requires: gummiboot
+
+%package -n %{name}-extlinux
+Summary: Command-line tool for tweaking extlinux configuration
+Provides: virtual-%{name}-bootloader
+Requires: %{name} = %{version}-%{release}
+Requires: syslinux-extlinux
+
+%package -n %{name}-clone
+Summary: A tool for cloning a Tizen system
+Provides: setup-ivi-clone = %{version}-%{release}
+Obsoletes: setup-ivi-clone < %{version}-%{release}
+Requires: %{name} = %{version}-%{release}
+Requires: /usr/bin/mount
+Requires: /usr/bin/udevadm
+Requires: /usr/bin/uuidgen
+Requires: /usr/bin/sync
+Requires: /usr/bin/tail
+Requires: systemd
+Requires: gptfdisk
+Requires: e2fsprogs
+Requires: dosfstools
+Requires: rsync
+
+%description
+This package provides various early system setup programs
+
+%description -n %{name}-gummiboot
+This package provides a command-line tool for changing the gummiboot bootloader
+configuration files.
+
+%description -n %{name}-extlinux
+This package provides a command-line tool for changing the extlinux bootloader
+configuration file.
+
+%description -n %{name}-clone
+This package provides a command line tool for cloning a Tizen system to a
+different disk.
+
+###
+### PREP
+###
+%prep
+%setup -q -n %{name}-%{version}
+
+%build
+
+###
+### INSTALL
+###
+%install
+install -d %{buildroot}/%{_sbindir}
+install -d %{buildroot}/%{_prefix}/share/setup-scripts
+install -d %{buildroot}/%{_unitdir}
+
+install -m755 setup-scripts-boot %{buildroot}/%{_sbindir}
+install -m755 setup-scripts-fstab %{buildroot}/%{_sbindir}
+install -m755 setup-scripts-bootloader-conf %{buildroot}/%{_sbindir}
+install -m755 setup-scripts-clone %{buildroot}/%{_sbindir}
+install -m755 setup-scripts-clone-service %{buildroot}/%{_sbindir}
+install -m644 scripts-clone.service %{buildroot}/%{_unitdir}
+install -m755 setup-gummiboot-conf %{buildroot}/%{_sbindir}
+install -m755 setup-extlinux-conf %{buildroot}/%{_sbindir}
+install -m644 setup-scripts-sh-functions %{buildroot}/%{_prefix}/share/setup-scripts
+install -m644 installerfw-sh-functions %{buildroot}/%{_prefix}/share/setup-scripts
+
+###
+### CLEAN
+###
+%clean
+rm -rf %{buildroot}
+
+###
+### FILES
+###
+%files
+%defattr(-,root,root)
+%{_sbindir}/setup-scripts-boot
+%{_sbindir}/setup-scripts-fstab
+%{_sbindir}/setup-scripts-bootloader-conf
+%{_prefix}/share/setup-scripts/setup-scripts-sh-functions
+%{_prefix}/share/setup-scripts/installerfw-sh-functions
+
+%files -n %{name}-gummiboot
+%defattr(-,root,root)
+%{_sbindir}/setup-gummiboot-conf
+
+%files -n %{name}-extlinux
+%defattr(-,root,root)
+%{_sbindir}/setup-extlinux-conf
+
+%files -n setup-scripts-clone
+%defattr(-,root,root)
+%{_sbindir}/setup-scripts-clone
+%{_sbindir}/setup-scripts-clone-service
+# Note, we do not need to run 'systemctl enable scripts-clone' for this one because
+# it is activated by the 'systemd.unit=scripts-clone.service' kernel parameter.
+%{_unitdir}/scripts-clone.service
[Unit]
-Description=Cloning of the Tizen IVI OS to a non-removable media
+Description=Cloning of the Tizen OS to a non-removable media
[Service]
Type=oneshot
StandardOutput=journal+console
StandardInput=tty
-ExecStart=/usr/sbin/setup-ivi-clone-service
+ExecStart=/usr/sbin/setup-scripts-clone-service
ExecStartPost=/usr/sbin/reboot
VER="1.0"
srcdir="$(readlink -ev -- ${0%/*})"
-if [ -f "$srcdir/setup-ivi-sh-functions" ]; then
- . "$srcdir/setup-ivi-sh-functions"
+if [ -f "$srcdir/setup-scripts-sh-functions" ]; then
+ . "$srcdir/setup-scripts-sh-functions"
else
- . /usr/share/setup-ivi/setup-ivi-sh-functions
+ . /usr/share/setup-scripts/setup-scripts-sh-functions
fi
# This is a small trick which I use to make sure my scripts are portable -
VER="1.0"
srcdir="$(readlink -ev -- ${0%/*})"
-if [ -f "$srcdir/setup-ivi-sh-functions" ]; then
- . "$srcdir/setup-ivi-sh-functions"
+if [ -f "$srcdir/setup-scripts-sh-functions" ]; then
+ . "$srcdir/setup-scripts-sh-functions"
else
- . /usr/share/setup-ivi/setup-ivi-sh-functions
+ . /usr/share/setup-scripts/setup-scripts-sh-functions
fi
# This is a small trick which I use to make sure my scripts are portable -
# Author: Artem Bityutskiy
# License: GPLv2
-PROG="setup-ivi-boot"
+PROG="setup-scripts-boot"
VER="1.0"
srcdir="$(readlink -ev -- ${0%/*})"
-PATH="/usr/share/setup-ivi:$srcdir:$PATH"
+PATH="/usr/share/setup-scripts:$srcdir:$PATH"
-if [ -f "$srcdir/setup-ivi-sh-functions" ]; then
- . "$srcdir/setup-ivi-sh-functions"
+if [ -f "$srcdir/setup-scripts-sh-functions" ]; then
+ . "$srcdir/setup-scripts-sh-functions"
. "$srcdir/installerfw-sh-functions"
else
- . /usr/share/setup-ivi/setup-ivi-sh-functions
- . /usr/share/setup-ivi/installerfw-sh-functions
+ . /usr/share/setup-scripts/setup-scripts-sh-functions
+ . /usr/share/setup-scripts/installerfw-sh-functions
fi
# This is a small trick which I use to make sure my scripts are portable -
fatal "no kernels (vmlinuz-*) found in \"$bootdir\""
printf "%s\n" "$kernels" | while IFS= read -r kernel; do
- setup-ivi-bootloader-conf $verbose add --force "$kernel"
+ setup-scripts-bootloader-conf $verbose add --force "$kernel"
done
# Set the default kernel to the kernel with highest version
newest_kernel="$(get_newest_kernel "$bootdir")"
-setup-ivi-bootloader-conf $verbose default "$newest_kernel"
+setup-scripts-bootloader-conf $verbose default "$newest_kernel"
# And finally, create the /etc/fstab file
-setup-ivi-fstab $verbose --force
+setup-scripts-fstab $verbose --force
# Author: Artem Bityutskiy
# License: GPLv2
-PROG="setup-ivi-bootloader-conf"
+PROG="setup-scripts-bootloader-conf"
VER="1.0"
srcdir="$(readlink -ev -- ${0%/*})"
-PATH="/usr/share/setup-ivi:$srcdir:$PATH"
+PATH="/usr/share/setup-scripts:$srcdir:$PATH"
-if [ -f "$srcdir/setup-ivi-sh-functions" ]; then
- . "$srcdir/setup-ivi-sh-functions"
+if [ -f "$srcdir/setup-scripts-sh-functions" ]; then
+ . "$srcdir/setup-scripts-sh-functions"
. "$srcdir/installerfw-sh-functions"
else
- . /usr/share/setup-ivi/setup-ivi-sh-functions
- . /usr/share/setup-ivi/installerfw-sh-functions
+ . /usr/share/setup-scripts/setup-scripts-sh-functions
+ . /usr/share/setup-scripts/installerfw-sh-functions
fi
# This is a small trick which I use to make sure my scripts are portable -
# Add the clone bootloader entry, but only if the cloning tool is
# installed
- if [ -f "$rootdir/usr/sbin/setup-ivi-clone" ]; then
- clone_opts="$options systemd.unit=ivi-clone.service"
- clone_opts="$clone_opts ivi-clone-target=autodetect"
+ if [ -f "$rootdir/usr/sbin/setup-scripts-clone" ]; then
+ clone_opts="$options systemd.unit=scripts-clone.service"
+ clone_opts="$clone_opts scripts-clone-target=autodetect"
setup-$boot-conf $verbose --bootdir "$bootdir" add \
$force "$kernel-clone" "Clone $os_name" \
"$kernel" "$clone_opts"
Usage: $PROG [options] <subcommand> [options] <arguments>
This program adds or removes a kernel to/from the bootloader configuration
-file(s). This is a Tizen IVI-specific program and it currently supports only 2
+file(s). This is a Tizen specific program and it currently supports only 2
bootloader types - extlinux and gummiboot. Each new kernel gets 2 boot menu
entries - the default and verbose, and both of these are removed by the
"remove" subcommand.
# Author: Artem Bityutskiy
# License: GPLv2
-PROG="setup-ivi-clone"
+PROG="setup-scripts-clone"
VER="1.0"
srcdir="$(readlink -ev -- ${0%/*})"
-if [ -f "$srcdir/setup-ivi-sh-functions" ]; then
- . "$srcdir/setup-ivi-sh-functions"
+if [ -f "$srcdir/setup-scripts-sh-functions" ]; then
+ . "$srcdir/setup-scripts-sh-functions"
. "$srcdir/installerfw-sh-functions"
else
- . /usr/share/setup-ivi/setup-ivi-sh-functions
- . /usr/share/setup-ivi/installerfw-sh-functions
+ . /usr/share/setup-scripts/setup-scripts-sh-functions
+ . /usr/share/setup-scripts/installerfw-sh-functions
fi
# This is a small trick which I use to make sure my scripts are portable -
# Check if the block device is mounted
# TODO: the much better way to do this is to use the open(2) "O_EXCL" flag
# which has special meaning for block devices. This would need to write a
-# C helper program, something like setup-ivi-open-helper.
+# C helper program, something like setup-scripts-open-helper.
is_mounted()
{
local devnode="$(esc_regexp "$1")"
cat <<-EOF
Usage: $PROG [options] <dstdisk>
-Clone a running Tizen IVI system to a different disk. The mandatory argument
+Clone a running Tizen system to a different disk. The mandatory argument
"<dstdisk>" is the device node name to clone to (e.g., /dev/sda). Be careful,
this program will destroy all the "<dstdisk>" data!
2. Partitions "<dstdisk>" according to "/etc/installerfw-environment" (the last
partition gets re-sized to consume all the space on "<dstdisk>").
3. Formats all the newly created partitions on "<dstdisk>".
-4. Copies all the data from the disk Tizen IVI currently runs from to
+4. Copies all the data from the disk Tizen currently runs from to
"<dstdisk>", partition-by-partition.
-5. Configures the cloned system on "<dstdisk>" by "setup-ivi-boot".
+5. Configures the cloned system on "<dstdisk>" by "setup-scripts-boot".
6. Reboots the system.
Options:
fatal "partition table type \"$ptable_format\" is not supported"
fi
-# Disable the Tizen IVI automount agent, otherwise it may start mounting the
+# Disable the Tizen automount agent, otherwise it may start mounting the
# $dstdisk partitions that we are going to create
automount_status="$(systemctl --user is-active udisks-automount-agent 2>/dev/null ||:)"
if [ "$automount_status" = "active" ]; then
amend_installerfw_environment
# Configure the target system
-$srcdir/setup-ivi-boot $verbose
+$srcdir/setup-scripts-boot $verbose
# Note, unmount happens in 'cleanup_handler()'
message "done, synchronizing the data"
# Author: Artem Bityutskiy
# License: GPLv2
-PROG="setup-ivi-clone-service"
+PROG="setup-scripts-clone-service"
VER="1.0"
srcdir="$(readlink -ev -- ${0%/*})"
-PATH="/usr/share/setup-ivi:$srcdir:$PATH"
+PATH="/usr/share/setup-scripts:$srcdir:$PATH"
-if [ -f "$srcdir/setup-ivi-sh-functions" ]; then
- . "$srcdir/setup-ivi-sh-functions"
+if [ -f "$srcdir/setup-scripts-sh-functions" ]; then
+ . "$srcdir/setup-scripts-sh-functions"
. "$srcdir/installerfw-sh-functions"
else
- . /usr/share/setup-ivi/setup-ivi-sh-functions
- . /usr/share/setup-ivi/installerfw-sh-functions
+ . /usr/share/setup-scripts/setup-scripts-sh-functions
+ . /usr/share/setup-scripts/installerfw-sh-functions
fi
# This is a small trick which I use to make sure my scripts are portable -
cat <<-EOF
Usage: $PROG [options]
-This program is a wrapper over the 'setup-ivi-clone' program and it is intended
+This program is a wrapper over the 'setup-scripts-clone' program and it is intended
to be executed from a systemd service when the system boots up.
By default, this program finds the first non-removable device in the system and
-installs the OS there. However, if the 'ivi-clone-target=<devnode>' kernel boot
+installs the OS there. However, if the 'scripts-clone-target=<devnode>' kernel boot
option is present (see "/proc/cmdline"), then this program installs the OS to
the disk represented by "<devnode>" (e.g., "/dev/sda").
-The 'ivi-clone-target=autodetect' kernel option causes the default behaviour.
+The 'scripts-clone-target=autodetect' kernel option causes the default behaviour.
Options:
-f, --force do not ask for confirmation, just proceed with cloning the OS
# last on the console.
sleep 2
-devnode="$(sed -n -e "s/^.*ivi-clone-target=\([^ ]\+\).*$/\1/p" /proc/cmdline)"
+devnode="$(sed -n -e "s/^.*scripts-clone-target=\([^ ]\+\).*$/\1/p" /proc/cmdline)"
if [ -z "$devnode" ] || [ "$devnode" = "autodetect" ]; then
devnode="$(find_an_internal_disk)"
disk_info="$devnode"
fi
-printf "%s\n" "cloning the Tizen IVI OS to \"$disk_info\""
+printf "%s\n" "cloning the Tizen OS to \"$disk_info\""
[ -z "$force" ] && get_confirmation
printf "%s\n" "this may take a while, be patient"
-setup-ivi-clone $verbose "$devnode" || fatal "failed to clone to $devnode"
+setup-scripts-clone $verbose "$devnode" || fatal "failed to clone to $devnode"
# Author: Artem Bityutskiy
# License: GPLv2
-PROG="setup-ivi-fstab"
+PROG="setup-scripts-fstab"
VER="1.0"
srcdir="$(readlink -ev -- ${0%/*})"
-PATH="/usr/share/setup-ivi:$srcdir:$PATH"
+PATH="/usr/share/setup-scripts:$srcdir:$PATH"
-if [ -f "$srcdir/setup-ivi-sh-functions" ]; then
- . "$srcdir/setup-ivi-sh-functions"
+if [ -f "$srcdir/setup-scripts-sh-functions" ]; then
+ . "$srcdir/setup-scripts-sh-functions"
. "$srcdir/installerfw-sh-functions"
else
- . /usr/share/setup-ivi/setup-ivi-sh-functions
- . /usr/share/setup-ivi/installerfw-sh-functions
+ . /usr/share/setup-scripts/setup-scripts-sh-functions
+ . /usr/share/setup-scripts/installerfw-sh-functions
fi
# This is a small trick which I use to make sure my scripts are portable -
cat <<-EOF
Usage: $PROG [options]
-Create the default Tizen IVI /etc/fstab file.
+Create the default Tizen /etc/fstab file.
Options:
-f, --force re-write /etc/fstab if it exists
# Author: Artem Bityutskiy
# License: GPLv2
-# This file contains common functions for setup-ivi-* programs
+# This file contains common functions for setup-scripts-* programs
# Own name
-__PROG="$PROG:-setup-ivi-sh-functions"
+__PROG="$PROG:-setup-scripts-sh-functions"
# Just a useful variable for the newline character(s)
br="