From f2819dabf201c457512303aa86711f9a301d11e6 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 24 Mar 2014 17:50:54 +0100 Subject: umount only ext4 data parts --- package/base-files/src/etc/inittab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'package') diff --git a/package/base-files/src/etc/inittab b/package/base-files/src/etc/inittab index f6183798e..e2ad18156 100644 --- a/package/base-files/src/etc/inittab +++ b/package/base-files/src/etc/inittab @@ -6,5 +6,5 @@ null::sysinit:/bin/mount -a -t devpts null::sysinit:/bin/mount -a -t tmpfs ::sysinit:/etc/init.d/rcS ::shutdown:/etc/init.d/rcK -null::shutdown:/bin/umount -a -r +null::shutdown:/bin/umount -a -t ext4 null::shutdown:/sbin/swapoff -a -- cgit v1.2.3 From 19692dacc3545ad56305817024e97524d4504377 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 24 Mar 2014 17:51:15 +0100 Subject: extend description --- package/hdparm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'package') diff --git a/package/hdparm/Makefile b/package/hdparm/Makefile index 61925e59c..91d0d0c03 100644 --- a/package/hdparm/Makefile +++ b/package/hdparm/Makefile @@ -7,7 +7,7 @@ PKG_NAME:= hdparm PKG_VERSION:= 9.43 PKG_RELEASE:= 1 PKG_MD5SUM:= f73233be118d86c779a8463d8b6a3cdb -PKG_DESCR:= get/set ATA drive parameters +PKG_DESCR:= get/set ATA/SATA drive parameters PKG_SECTION:= fs PKG_URL:= http://sourceforge.net/projects/hdparm PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=hdparm/} -- cgit v1.2.3 From a4e25d35371e6480664b04080361dc877b65de12 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 24 Mar 2014 17:54:09 +0100 Subject: remove mpd read-only feature, needs rework with command line parameter --- package/mpd/Makefile | 2 +- .../patches/patch-src_db_SimpleDatabasePlugin_cxx | 91 ---------------------- package/mpd/patches/patch-src_thread_Id_hxx | 11 --- 3 files changed, 1 insertion(+), 103 deletions(-) delete mode 100644 package/mpd/patches/patch-src_db_SimpleDatabasePlugin_cxx delete mode 100644 package/mpd/patches/patch-src_thread_Id_hxx (limited to 'package') diff --git a/package/mpd/Makefile b/package/mpd/Makefile index 4c8ab359a..fae44277e 100644 --- a/package/mpd/Makefile +++ b/package/mpd/Makefile @@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= mpd PKG_VERSION:= 0.18.9 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= 0e5156a831d4302d2032998bcfd5c36f PKG_DESCR:= A music player daemon PKG_SECTION:= multimedia diff --git a/package/mpd/patches/patch-src_db_SimpleDatabasePlugin_cxx b/package/mpd/patches/patch-src_db_SimpleDatabasePlugin_cxx deleted file mode 100644 index 0f28de720..000000000 --- a/package/mpd/patches/patch-src_db_SimpleDatabasePlugin_cxx +++ /dev/null @@ -1,91 +0,0 @@ ---- mpd-0.18.5.orig/src/db/SimpleDatabasePlugin.cxx 2013-11-22 00:33:30.000000000 +0100 -+++ mpd-0.18.5/src/db/SimpleDatabasePlugin.cxx 2013-11-30 19:17:55.000000000 +0100 -@@ -35,6 +35,9 @@ - - #include - #include -+#include -+#include -+#include - - static constexpr Domain simple_db_domain("simple_db"); - -@@ -95,8 +98,8 @@ SimpleDatabase::Check(Error &error) cons - return false; - } - -- /* Check if we can write to the directory */ -- if (!CheckAccess(dirPath, X_OK | W_OK)) { -+ /* Check if we can change into the directory */ -+ if (!CheckAccess(dirPath, X_OK)) { - const int e = errno; - const std::string dirPath_utf8 = dirPath.ToUTF8(); - error.FormatErrno(e, "Can't create db file in \"%s\"", -@@ -122,9 +125,9 @@ SimpleDatabase::Check(Error &error) cons - return false; - } - -- /* And check that we can write to it */ -- if (!CheckAccess(path, R_OK | W_OK)) { -- error.FormatErrno("Can't open db file \"%s\" for reading/writing", -+ /* And check that we can read it */ -+ if (!CheckAccess(path, R_OK)) { -+ error.FormatErrno("Can't open db file \"%s\" for reading", - path_utf8.c_str()); - return false; - } -@@ -281,6 +284,10 @@ SimpleDatabase::GetStats(const DatabaseS - bool - SimpleDatabase::Save(Error &error) - { -+ struct mntent *mnt; -+ int remount; -+ FILE *f; -+ - db_lock(); - - LogDebug(simple_db_domain, "removing empty directories from DB"); -@@ -293,6 +300,26 @@ SimpleDatabase::Save(Error &error) - - LogDebug(simple_db_domain, "writing DB"); - -+ remount = 0; -+ /* check if /data is mounted read-only */ -+ if ((f = setmntent("/proc/mounts", "r")) == NULL) -+ error.Format(simple_db_domain, "Checking /proc/mounts failed"); -+ -+ while ((mnt = getmntent(f)) != NULL) { -+ if (strcmp(mnt->mnt_dir, "/data") == 0 && -+ hasmntopt(mnt, MNTOPT_RO) != NULL) { -+ remount = 1; -+ } -+ } -+ endmntent(f); -+ -+ if (remount) { -+ if (mount("","/data",0,MS_REMOUNT,0)<0) { -+ error.Format(simple_db_domain, "Remounting /data rw failed"); -+ } -+ LogDebug(simple_db_domain, "Mounted /data successfully in read-write mode"); -+ } -+ - FILE *fp = FOpen(path, FOpenMode::WriteText); - if (!fp) { - error.FormatErrno("unable to write to db file \"%s\"", -@@ -310,6 +337,16 @@ SimpleDatabase::Save(Error &error) - - fclose(fp); - -+ if (remount) { -+ sync(); -+ if (mount("","/data",0,MS_REMOUNT|MS_RDONLY,0)<0) { -+ error.Format(simple_db_domain, "Remounting /data ro failed"); -+ } -+ LogDebug(simple_db_domain, "Mounted /data successfully in read-only mode"); -+ } -+ -+ LogDebug(simple_db_domain, "Successfully written database"); -+ - struct stat st; - if (StatFile(path, st)) - mtime = st.st_mtime; diff --git a/package/mpd/patches/patch-src_thread_Id_hxx b/package/mpd/patches/patch-src_thread_Id_hxx deleted file mode 100644 index dabee4007..000000000 --- a/package/mpd/patches/patch-src_thread_Id_hxx +++ /dev/null @@ -1,11 +0,0 @@ ---- mpd-0.18.5.orig/src/thread/Id.hxx 2013-11-18 23:50:46.000000000 +0100 -+++ mpd-0.18.5/src/thread/Id.hxx 2013-11-29 20:50:36.000000000 +0100 -@@ -84,7 +84,7 @@ public: - #ifdef WIN32 - return id == other.id; - #else -- return ::pthread_equal(id, other.id); -+ return pthread_equal(id, other.id); - #endif - } - -- cgit v1.2.3 From dcb0b50b2476edc40a7f1a877625d9cb2e862fe1 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 25 Mar 2014 11:50:38 +0100 Subject: fix recursive tmp crap --- package/base-files/Makefile | 2 +- package/base-files/src/etc/init.d/boot | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'package') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 0db6ad87f..45e7f1cc4 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/mk/rootfs.mk PKG_NAME:= base-files PKG_VERSION:= 1.0 -PKG_RELEASE:= 78 +PKG_RELEASE:= 79 PKG_SECTION:= base PKG_DESCR:= basic files and scripts PKG_BUILDDEP:= pkgconf-host file-host diff --git a/package/base-files/src/etc/init.d/boot b/package/base-files/src/etc/init.d/boot index 1af4acdf3..291bf6ab4 100644 --- a/package/base-files/src/etc/init.d/boot +++ b/package/base-files/src/etc/init.d/boot @@ -27,9 +27,9 @@ cat /etc/.rnd >/dev/urandom 2>&1 # create some useful directories in tmpfs mkdir -p /var/log mkdir -p /var/run +mkdir -p /var/tmp touch /var/log/lastlog touch /var/log/wtmp -ln -s /tmp /var/tmp HOSTNAME= [[ -s /etc/hostname ]] && HOSTNAME=$(cat /etc/hostname) -- cgit v1.2.3