Hello community,

here is the log from the commit of package alsa-utils for openSUSE:Factory 
checked in at 2012-06-25 12:20:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/alsa-utils (Old)
 and      /work/SRC/openSUSE:Factory/.alsa-utils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "alsa-utils", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/alsa-utils/alsa-utils.changes    2012-06-01 
07:19:37.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.alsa-utils.new/alsa-utils.changes       
2012-06-25 12:20:47.000000000 +0200
@@ -1,0 +2,13 @@
+Wed Jun 20 18:19:21 CEST 2012 - [email protected]
+
+- Fix the installation of postinit rules
+- Add (empty) preinit directory for alsactl init as a placeholder
+
+-------------------------------------------------------------------
+Fri Jun 15 15:41:10 CEST 2012 - [email protected]
+
+- Make beep silent as default (bnc#767270)
+- Backport fixes for alsactl init
+- Fix invalid .LO entry in man page
+
+-------------------------------------------------------------------

New:
----
  0014-alsactl-Read-only-.conf-files-when-a-directory-is-pa.patch
  0015-alsactl-Add-reference-to-alsactl_init-7-in-alsactl-m.patch
  0016-aseqnet-Remove-obsoleted-.LO-entry-from-man-page.patch
  01beep.conf

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ alsa-utils.spec ++++++
--- /var/tmp/diff_new_pack.LWnGVd/_old  2012-06-25 12:20:48.000000000 +0200
+++ /var/tmp/diff_new_pack.LWnGVd/_new  2012-06-25 12:20:48.000000000 +0200
@@ -42,6 +42,7 @@
 Version:        1.0.25
 Release:        0
 Source:         
ftp://ftp.alsa-project.org/pub/utils/alsa-utils-%{package_version}.tar.bz2
+Source1:        01beep.conf
 # Patch:          alsa-utils-git-fixes.diff
 Patch1:         0001-Fix-the-examples-in-aplay.1.patch
 Patch2:         0002-Trivial-fixes-in-INSTALL-file.patch
@@ -55,6 +56,9 @@
 Patch11:        0011-alsactl-Do-not-access-other-cards-than-specified-for.patch
 Patch12:        0012-aplay-print-vu-meter-to-stderr-not-stdout.patch
 Patch13:        0013-alsaloop-fix-the-avail_min-setup.patch
+Patch14:        0014-alsactl-Read-only-.conf-files-when-a-directory-is-pa.patch
+Patch15:        0015-alsactl-Add-reference-to-alsactl_init-7-in-alsactl-m.patch
+Patch16:        0016-aseqnet-Remove-obsoleted-.LO-entry-from-man-page.patch
 Patch99:        alsa-utils-gettext-version-removal.diff
 Url:            http://www.alsa-project.org/
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -81,6 +85,9 @@
 %patch11 -p1
 %patch12 -p1
 %patch13 -p1
+%patch14 -p1
+%patch15 -p1
+%patch16 -p1
 %if %suse_version < 1020
 %patch99 -p1
 %endif
@@ -106,6 +113,11 @@
 
 %install
 %makeinstall
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/alsa/init/preinit
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/alsa/init/postinit
+for i in %{_sourcedir}/[0-9]*.conf; do
+  install -c -m 0644 $i $RPM_BUILD_ROOT%{_datadir}/alsa/init/postinit
+done
 %find_lang %{name} --all-name
 %if %use_systemd
 ln -s alsa-restore.service $RPM_BUILD_ROOT/lib/systemd/system/alsasound.service

++++++ 0014-alsactl-Read-only-.conf-files-when-a-directory-is-pa.patch ++++++
>From c68a3d02d161ccb6358620fb6442bc5c194f20f1 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <[email protected]>
Date: Thu, 14 Jun 2012 13:14:48 +0200
Subject: [PATCH 14/15] alsactl: Read only *.conf files when a directory is
 passed via INCLUDE

When alsactl init is invoked and a directory path is passed to INCLUDE
command in the config file, read only *.conf files in that directory.
This will avoid reading backup files or invalid files that have been
created accidentally.

Also by using scandir() with alphasort(), alsactl reads the files in
alphabetical order.  Thus it's highly recommended to use some number
prefix to the file name for assuring the order.

Signed-off-by: Takashi Iwai <[email protected]>
---
 alsactl/alsactl_init.xml |   10 +++++++++-
 alsactl/init_parse.c     |   35 +++++++++++++++++++++++++----------
 2 files changed, 34 insertions(+), 11 deletions(-)

diff --git a/alsactl/alsactl_init.xml b/alsactl/alsactl_init.xml
index eefe9ef..bce26f5 100644
--- a/alsactl/alsactl_init.xml
+++ b/alsactl/alsactl_init.xml
@@ -474,7 +474,15 @@
             <varlistentry>
               <term><option>INCLUDE</option></term>
               <listitem>
-                <para>Include specified filename or all files in specified 
directory</para>
+                <para>Include the specified filename or files in specified 
directory.
+               </para>
+               <para>
+               When a directory is specified, only the files with the
+               extension ".conf" are read.
+               Also they are read in the alphabetical order.
+               Thus it's highly recommended to use some number prefix
+               (e.g. "01-something.conf") to assure the order of execucions.
+               </para>
               </listitem>
             </varlistentry>
 
diff --git a/alsactl/init_parse.c b/alsactl/init_parse.c
index 51b515c..8a7173b 100644
--- a/alsactl/init_parse.c
+++ b/alsactl/init_parse.c
@@ -1278,6 +1278,13 @@ static char *new_root_dir(const char *filename)
        return res;
 }
 
+/* return non-zero if the file name has the extension ".conf" */
+static int conf_name_filter(const struct dirent *d)
+{
+       char *ext = strrchr(d->d_name, '.');
+       return ext && !strcmp(ext, ".conf");
+}
+
 static int parse_line(struct space *space, char *line, size_t linesize)
 {
        char *linepos;
@@ -1480,8 +1487,7 @@ static int parse_line(struct space *space, char *line, 
size_t linesize)
                if (strcasecmp(key, "INCLUDE") == 0) {
                        char *rootdir, *go_to;
                        const char *filename;
-                       struct dirent *dirent;
-                       DIR *dir;
+                       struct stat st;
                        int linenum;
                        if (op != KEY_OP_ASSIGN) {
                                Perror(space, "invalid INCLUDE operation");
@@ -1498,18 +1504,27 @@ static int parse_line(struct space *space, char *line, 
size_t linesize)
                        go_to = space->go_to;
                        filename = space->filename;
                        linenum = space->linenum;
-                       dir = opendir(string);
-                       if (dir) {
+                       if (stat(string, &st)) {
+                               Perror(space, "invalid filename '%s'", string);
+                               continue;
+                       }
+                       if (S_ISDIR(st.st_mode)) {
+                               struct dirent **list;
+                               int i, num;
+                               num = scandir(string, &list, conf_name_filter,
+                                             alphasort);
+                               if (num < 0) {
+                                       Perror(space, "invalid directory '%s'", 
string);
+                                       continue;
+                               }
                                count = strlen(string);
-                               while ((dirent = readdir(dir)) != NULL) {
-                                       if (strcmp(dirent->d_name, ".") == 0 ||
-                                           strcmp(dirent->d_name, "..") == 0)
-                                               continue;
+                               for (i = 0; i < num; i++) {
                                        string[count] = '\0';
                                        strlcat(string, "/", sizeof(string));
-                                       strlcat(string, dirent->d_name, 
sizeof(string));
+                                       strlcat(string, list[i]->d_name, 
sizeof(string));
                                        space->go_to = NULL;
                                        space->rootdir = new_root_dir(string);
+                                       free(list[i]);
                                        if (space->rootdir) {
                                                err = parse(space, string);
                                                free(space->rootdir);
@@ -1522,7 +1537,7 @@ static int parse_line(struct space *space, char *line, 
size_t linesize)
                                        if (err)
                                                break;
                                }
-                               closedir(dir);
+                               free(list);
                        } else {
                                space->go_to = NULL;
                                space->rootdir = new_root_dir(string);
-- 
1.7.10.4

++++++ 0015-alsactl-Add-reference-to-alsactl_init-7-in-alsactl-m.patch ++++++
>From c3111571dc6a45e20c79a2c4fa590101d35db822 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <[email protected]>
Date: Thu, 14 Jun 2012 16:14:29 +0200
Subject: [PATCH 15/15] alsactl: Add reference to alsactl_init(7) in alsactl
 man page

Signed-off-by: Takashi Iwai <[email protected]>
---
 alsactl/alsactl.1 |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/alsactl/alsactl.1 b/alsactl/alsactl.1
index eb5968c..054f511 100644
--- a/alsactl/alsactl.1
+++ b/alsactl/alsactl.1
@@ -107,7 +107,8 @@ routing options, etc).
 \fB
 amixer(1),
 alsamixer(1),
-aplay(1)
+aplay(1),
+alsactl_init(7)
 \fP
 
 .SH BUGS 
-- 
1.7.10.4

++++++ 0016-aseqnet-Remove-obsoleted-.LO-entry-from-man-page.patch ++++++
>From 2b31992c799488c5a93bfe0b17d64b5196b122b4 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <[email protected]>
Date: Fri, 15 Jun 2012 16:34:55 +0200
Subject: [PATCH] aseqnet: Remove obsoleted .LO entry from man page

Signed-off-by: Takashi Iwai <[email protected]>
---
 seq/aseqnet/aseqnet.1 |    1 -
 1 file changed, 1 deletion(-)

diff --git a/seq/aseqnet/aseqnet.1 b/seq/aseqnet/aseqnet.1
index a1dc1d3..2cb6eb7 100644
--- a/seq/aseqnet/aseqnet.1
+++ b/seq/aseqnet/aseqnet.1
@@ -1,5 +1,4 @@
 .TH aseqnet 1 "January 1, 2000"
-.LO 1
 .SH NAME
 aseqnet \- ALSA sequencer connectors over network
 
-- 
1.7.10.4

++++++ 01beep.conf ++++++
CTL{reset}="mixer"
CTL{name}="PC Speaker Playback Volume",CTL{do_search}=="1", \
  CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="0"
CTL{name}="PC Speaker Playback Switch",CTL{do_search}=="1", \
  CTL{values}="off"

CTL{reset}="mixer"
CTL{name}="PC Beep Playback Volume",CTL{do_search}=="1", \
  CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="0"
CTL{name}="PC Beep Playback Switch",CTL{do_search}=="1", \
  CTL{values}="off"

CTL{reset}="mixer"
CTL{name}="Beep Playback Volume",CTL{do_search}=="1", \
  CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="0"
CTL{name}="Beep Playback Switch",CTL{do_search}=="1", \
  CTL{values}="off"
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to