summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2018-01-09 01:32:02 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2018-01-09 01:32:02 +0300
commit11d2cb6aef4c3cca7eb1971ffb94e33c9f2d6617 (patch)
tree40106122028f49feb7390db6e11abd40fae1a27b
parent8c57303e4a28571726d56083500456cbb606fd45 (diff)
paludis: news format patch
samba: build fix
-rw-r--r--net-fs/samba/samba-scm.ebuild7
-rw-r--r--sys-apps/paludis/files/news_v2.patch122
-rw-r--r--sys-apps/paludis/paludis-scm.ebuild1
3 files changed, 125 insertions, 5 deletions
diff --git a/net-fs/samba/samba-scm.ebuild b/net-fs/samba/samba-scm.ebuild
index 9521fd2..a30b7b7 100644
--- a/net-fs/samba/samba-scm.ebuild
+++ b/net-fs/samba/samba-scm.ebuild
@@ -11,7 +11,7 @@ inherit python-single-r1 waf-utils multilib-minimal linux-info systemd eutils gi
SRC_PATH="stable"
-SRC_URI="https://dev.gentoo.org/~polynomial-c/samba-disable-python-patches-4.5.0_rc1.tar.xz"
+SRC_URI=""
EGIT_REPO_URI="git://git.samba.org/samba.git"
@@ -81,9 +81,6 @@ REQUIRED_USE="addc? ( gnutls !system-mitkrb5 )
${PYTHON_REQUIRED_USE}"
-PATCHES=(
- "${FILESDIR}/${PN}-4.4.0-pam.patch"
-)
#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
CONFDIR="${FILESDIR}/4.4"
@@ -108,7 +105,7 @@ src_prepare() {
default
# install the patches from tarball(s)
- eapply "${WORKDIR}/patches/"
+# eapply "${WORKDIR}/patches/"
multilib_copy_sources
}
diff --git a/sys-apps/paludis/files/news_v2.patch b/sys-apps/paludis/files/news_v2.patch
new file mode 100644
index 0000000..f630203
--- /dev/null
+++ b/sys-apps/paludis/files/news_v2.patch
@@ -0,0 +1,122 @@
+diff --git a/paludis/repositories/e/e_repository_news.cc b/paludis/repositories/e/e_repository_news.cc
+index 8a16893..647ce8d 100644
+--- a/paludis/repositories/e/e_repository_news.cc
++++ b/paludis/repositories/e/e_repository_news.cc
+@@ -161,13 +161,14 @@ ERepositoryNews::update_news() const
+ NewsFile news(*d / (d->basename() + ".en.txt"));
+ bool show(true);
+
+- const EAPI & eapi(*erepository::EAPIData::get_instance()->eapi_from_string(
+- _imp->e_repository->params().profile_eapi_when_unspecified()));
+-
+ if (news.begin_display_if_installed() != news.end_display_if_installed())
+ {
+ Context header_context("When checking Display-If-Installed headers:");
+
++ const EAPI & eapi(*erepository::EAPIData::get_instance()->eapi_from_string(
++ (news.version().compare(0, 2, "2.",0, 2) == 0 ) ? "5" :
++ (news.version().compare(0, 2, "1.",0, 2) == 0 ) ? "0" :
++ _imp->e_repository->params().profile_eapi_when_unspecified()));
+ bool local_show(false);
+ for (NewsFile::DisplayIfInstalledConstIterator i(news.begin_display_if_installed()),
+ i_end(news.end_display_if_installed()) ; i != i_end ; ++i)
+@@ -206,9 +207,23 @@ ERepositoryNews::update_news() const
+ Log::get_instance()->message("e.news.profile_path", ll_debug, lc_no_context) <<
+ "Profile path is '" << profile << "'";
+ for (NewsFile::DisplayIfProfileConstIterator i(news.begin_display_if_profile()),
+- i_end(news.end_display_if_profile()) ; i != i_end ; ++i)
+- if (profile == *i)
+- local_show = true;
++ i_end(news.end_display_if_profile()) ; i != i_end ; ++i){
++ if ( 0 == news.version().compare(0, 2, "1.", 0, 2))
++ {
++ if (profile == *i)
++ local_show = true;
++ }
++ else if ( 0 == news.version().compare(0, 2, "2.", 0, 2))
++ {
++ // Check wildcard ( "/*" ) profile paths
++ if ( 0 == (*i).compare((*i).length() - 2, 2, "/*")){
++ if ( 0 == (profile.compare(0, (*i).length()-2, *i, 0, (*i).length() -2 )))
++ local_show = true;
++ }
++ else if ( profile == *i )
++ local_show = true;
++ }
++ }
+ }
+ show &= local_show;
+ }
+@@ -263,6 +278,7 @@ namespace paludis
+ DisplayIfList display_if_installed;
+ DisplayIfList display_if_keyword;
+ DisplayIfList display_if_profile;
++ std::string version;
+ };
+ }
+
+@@ -318,12 +334,27 @@ NewsFile::NewsFile(const FSPath & our_filename) :
+ throw NewsError(our_filename, "Multiple News-Item-Format headers specified");
+
+ seen_news_item_format = true;
+- if (0 != v.compare(0, 2, "1.", 0, 2))
++ if ( 0 == v.compare(0, 2, "1.",0, 2) )
++ {
++ if ( v != "1.0" )
++ {
++ Log::get_instance()->message("e.news.format", ll_warning, lc_context) <<
++ "News file '" << our_filename << "' uses news item format '" << v << "', but we only support "
++ "version 1 news up to 1.0.";
++ }
++ }
++ else if ( 0 == v.compare(0, 2, "2.", 0, 2))
++ {
++ if ( v != "2.0")
++ {
++ Log::get_instance()->message("e.news.format", ll_warning, lc_context) <<
++ "News file '" << our_filename << "' uses news item format '" << v << "', but we only support "
++ "version 2 news items up to 2.0.";
++ }
++ }
++ else
+ throw NewsError(our_filename, "Unsupported News-Item-Format '" + v + "'");
+- if (v != "1.0")
+- Log::get_instance()->message("e.news.format", ll_warning, lc_context) <<
+- "News file '" << our_filename << "' uses news item format '" << v << "', but we only support "
+- "versions up to 1.0.";
++ _imp->version = v;
+ }
+ else if (k == "Posted")
+ seen_posted = true;
+@@ -338,7 +369,7 @@ NewsFile::NewsFile(const FSPath & our_filename) :
+ throw NewsError(our_filename, "No News-Item-Format header specified");
+ if (! seen_author)
+ throw NewsError(our_filename, "No Author header specified");
+- if (! seen_content_type)
++ if ( _imp->version == "1.0" && ! seen_content_type)
+ throw NewsError(our_filename, "No Content-Type header specified");
+ if (! seen_title)
+ throw NewsError(our_filename, "No Title header specified");
+@@ -391,6 +422,10 @@ NewsError::NewsError(const FSPath & f, const std::string & m) noexcept :
+ {
+ }
+
++std::string NewsFile::version() const{
++ return _imp->version;
++}
++
+ namespace paludis
+ {
+ template class WrappedForwardIterator<NewsFile::DisplayIfInstalledConstIteratorTag, const std::string>;
+diff --git a/paludis/repositories/e/e_repository_news.hh b/paludis/repositories/e/e_repository_news.hh
+index 55beb3f..d3cd860 100644
+--- a/paludis/repositories/e/e_repository_news.hh
++++ b/paludis/repositories/e/e_repository_news.hh
+@@ -93,6 +93,7 @@ namespace paludis
+
+ ///\}
+
++ std::string version() const;
+ ///\name Iterate over our Display-If-Installed headers
+ ///\{
+
diff --git a/sys-apps/paludis/paludis-scm.ebuild b/sys-apps/paludis/paludis-scm.ebuild
index d65304c..a08fa2d 100644
--- a/sys-apps/paludis/paludis-scm.ebuild
+++ b/sys-apps/paludis/paludis-scm.ebuild
@@ -78,6 +78,7 @@ src_prepare() {
# https://bugs.gentoo.org/show_bug.cgi?id=439372#c2
sed -i -e "1s/ruby/&${RUBY_VER/./}/" ruby/demos/*.rb || die
eapply "${FILESDIR}"/0001-use-correct-type-when-stringifying-whirlpool-checksu.patch
+ eapply "${FILESDIR}"/news_v2.patch
eapply_user
}