From e0bb6391a9bd55f3856fa45f23a7891d29b834ad Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 27 Jun 2020 15:57:12 +0200 Subject: gnu: ilmbase: Update to 2.5.2. * gnu/packages/patches/ilmbase-fix-test-arm.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/graphics.scm (ilmbase): Update to 2.5.2. [source](patches): Remove 'ilmbase-fix-test-arm.patch'. (openexr)[arguments]: Really increase test timeout, as the previous fix was ineffective. --- gnu/packages/patches/ilmbase-fix-test-arm.patch | 60 ------------------------- 1 file changed, 60 deletions(-) delete mode 100644 gnu/packages/patches/ilmbase-fix-test-arm.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/ilmbase-fix-test-arm.patch b/gnu/packages/patches/ilmbase-fix-test-arm.patch deleted file mode 100644 index 2dbc55e8c4..0000000000 --- a/gnu/packages/patches/ilmbase-fix-test-arm.patch +++ /dev/null @@ -1,60 +0,0 @@ -Fix a test failure on ARM platforms: - -https://github.com/AcademySoftwareFoundation/openexr/issues/713 - -Taken from upstream: - -https://github.com/AcademySoftwareFoundation/openexr/commit/76d9839cd1b300398f8b801dfcb4bcf2f8c0096f - -diff --git a/OpenEXR/IlmImfTest/testHuf.cpp b/OpenEXR/IlmImfTest/testHuf.cpp -index 4c887ee8..a93b8ea9 100644 ---- a/OpenEXR/IlmImfTest/testHuf.cpp -+++ b/OpenEXR/IlmImfTest/testHuf.cpp -@@ -181,9 +181,9 @@ compressUncompressSubset(const unsigned short raw[], int n) - // This DEK hash is determined from an aprior initial run of this - // test noting its value from the assert message compressVerify(). - // --#define HUF_COMPRESS_DEK_HASH_FOR_FILL4_USHRT_MAX_PLUS_ONE 2956869585U --#define HUF_COMPRESS_DEK_HASH_FOR_FILL4_N 3414126535U --#define HUF_COMPRESS_DEK_HASH_FOR_FILL5_N 169791374U -+#define HUF_COMPRESS_DEK_HASH_FOR_FILL4_USHRT_MAX_PLUS_ONE 2013380646U -+#define HUF_COMPRESS_DEK_HASH_FOR_FILL4_N 213880353U -+#define HUF_COMPRESS_DEK_HASH_FOR_FILL5_N 2492982090U - - void - compressVerify (const unsigned short raw[], -@@ -200,7 +200,7 @@ compressVerify (const unsigned short raw[], - // under the topic of sorting and search chapter 6.4. - // - unsigned int compressedHash = nCompressed; -- const char* cptr = compressed; -+ const unsigned char* cptr = reinterpret_cast( (const char*) compressed); - for (int i = 0; i < nCompressed; ++i) - { - compressedHash = -@@ -210,6 +210,25 @@ compressVerify (const unsigned short raw[], - cout << "verifying compressed checksum hash = " - << compressedHash << std::endl; - -+ if (compressedHash != dekHash) -+ { -+ cout << "hash verification failed. Got " << compressedHash << " expected " << dekHash << std::endl; -+ const unsigned char* cptr = reinterpret_cast( (const char*) compressed); -+ for(int i = 0 ; i < nCompressed ; ++i ) -+ { -+ cout << std::hex << (0xFF & (int) (*cptr++)); -+ if ( (i & 0xF) ==0 ) -+ { -+ cout << '\n'; -+ } -+ else -+ { -+ cout << ' '; -+ } -+ } -+ cout << "\n"; -+ } -+ - assert (compressedHash == dekHash); - } - -- cgit v1.2.3 From afdc16d9041fde77913b6e84679dc581c54df2d6 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 27 Jun 2020 16:48:20 +0200 Subject: gnu: x265: Update to 3.4. * gnu/packages/patches/x265-arm-flags.patch: Update patch. * gnu/packages/video.scm (x265): Update to 3.4. [arguments]: Remove obsolete substitution. Disable the newly-added assembly optimizations on AArch64, as they are not implemented for all targets we build. --- gnu/packages/patches/x265-arm-flags.patch | 38 +++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/x265-arm-flags.patch b/gnu/packages/patches/x265-arm-flags.patch index f17e26f6f1..342e13270b 100644 --- a/gnu/packages/patches/x265-arm-flags.patch +++ b/gnu/packages/patches/x265-arm-flags.patch @@ -1,4 +1,7 @@ -https://sources.debian.org/src/x265/2.9-3/debian/patches/0001-Fix-arm-flags.patch/ +Fix build flags for ARMv7. + +Taken from Debian: +https://salsa.debian.org/multimedia-team/x265/-/blob/master/debian/patches/0001-Fix-arm-flags.patch From: Sebastian Ramacher Date: Wed, 26 Apr 2017 22:05:06 +0200 @@ -9,28 +12,25 @@ Subject: Fix arm* flags 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt -index 33b6523..25aecbb 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt -@@ -72,7 +72,7 @@ elseif(ARMMATCH GREATER "-1") +@@ -77,7 +77,7 @@ elseif(ARMMATCH GREATER "-1") + add_definitions(-DX265_ARCH_ARM=1 -DX265_ARCH_ARM64=1 -DHAVE_ARMV6=0) + else() + message(STATUS "Detected ARM target processor") +- add_definitions(-DX265_ARCH_ARM=1 -DX265_ARCH_ARM64=0 -DHAVE_ARMV6=1) ++ add_definitions(-DX265_ARCH_ARM=1) endif() - message(STATUS "Detected ARM target processor") - set(ARM 1) -- add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1) -+ # add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1) else() message(STATUS "CMAKE_SYSTEM_PROCESSOR value `${CMAKE_SYSTEM_PROCESSOR}` is unknown") - message(STATUS "Please add this value near ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}") -@@ -230,12 +230,8 @@ if(GCC) - if(ARM AND CROSS_COMPILE_ARM) - set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC) - elseif(ARM) -- find_package(Neon) - if(CPU_HAS_NEON) -- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC) - add_definitions(-DHAVE_NEON) -- else() -- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm) +@@ -252,10 +252,7 @@ if(GCC) + else() + find_package(Neon) + if(CPU_HAS_NEON) +- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC) + add_definitions(-DHAVE_NEON) +- else() +- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm) + endif() endif() endif() - add_definitions(${ARM_ARGS}) -- cgit v1.2.3 From 10543ef8e148f5329b41568f92e83dac3930f02b Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Mon, 29 Jun 2020 12:06:50 +0200 Subject: gnu: Add ppsspp. * gnu/packages/emulators.scm (ppsspp): New variable. * gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch: New file. * gnu/local.mk: Register it. Signed-off-by: Nicolas Goaziou --- .../patches/ppsspp-disable-upgrade-and-gold.patch | 358 +++++++++++++++++++++ 1 file changed, 358 insertions(+) create mode 100644 gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch b/gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch new file mode 100644 index 0000000000..9503ab6f31 --- /dev/null +++ b/gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch @@ -0,0 +1,358 @@ +From 951f2269f67d618d376656db831796c119f4f6b3 Mon Sep 17 00:00:00 2001 +From: Leo Prikler +Date: Fri, 26 Jun 2020 18:20:04 +0200 +Subject: [PATCH] ppsspp: disable upgrade and gold + +--- + Core/Config.cpp | 11 ------- + Core/Config.h | 2 -- + Qt/QtMain.cpp | 6 ---- + SDL/SDLMain.cpp | 6 ---- + UI/DevScreens.cpp | 3 -- + UI/GameSettingsScreen.cpp | 1 - + UI/MainScreen.cpp | 63 +------------------------------------ + UI/MiscScreens.cpp | 31 ++---------------- + UWP/PPSSPP_UWPMain.cpp | 6 ---- + Windows/MainWindowMenu.cpp | 2 +- + Windows/main.cpp | 6 ---- + android/jni/app-android.cpp | 6 ---- + 12 files changed, 5 insertions(+), 138 deletions(-) + +diff --git a/Core/Config.cpp b/Core/Config.cpp +index 214aeb433..04e3b151d 100644 +--- a/Core/Config.cpp ++++ b/Core/Config.cpp +@@ -428,7 +428,6 @@ static ConfigSetting generalSettings[] = { + ConfigSetting("IgnoreBadMemAccess", &g_Config.bIgnoreBadMemAccess, true, true), + ConfigSetting("CurrentDirectory", &g_Config.currentDirectory, ""), + ConfigSetting("ShowDebuggerOnLoad", &g_Config.bShowDebuggerOnLoad, false), +- ConfigSetting("CheckForNewVersion", &g_Config.bCheckForNewVersion, true), + ConfigSetting("Language", &g_Config.sLanguageIni, &DefaultLangRegion), + ConfigSetting("ForceLagSync2", &g_Config.bForceLagSync, false, true, true), + ConfigSetting("DiscordPresence", &g_Config.bDiscordPresence, true, true, false), // Or maybe it makes sense to have it per-game? Race conditions abound... +@@ -1229,16 +1228,6 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) { + upgradeMessage = ""; + } + +- // Check for new version on every 10 runs. +- // Sometimes the download may not be finished when the main screen shows (if the user dismisses the +- // splash screen quickly), but then we'll just show the notification next time instead, we store the +- // upgrade number in the ini. +- if (iRunCount % 10 == 0 && bCheckForNewVersion) { +- std::shared_ptr dl = g_DownloadManager.StartDownloadWithCallback( +- "http://www.ppsspp.org/version.json", "", &DownloadCompletedCallback); +- dl->SetHidden(true); +- } +- + INFO_LOG(LOADER, "Loading controller config: %s", controllerIniFilename_.c_str()); + bSaveSettings = true; + +diff --git a/Core/Config.h b/Core/Config.h +index 084eacc94..e7134cab5 100644 +--- a/Core/Config.h ++++ b/Core/Config.h +@@ -99,7 +99,6 @@ struct Config { + bool bIgnoreBadMemAccess; + bool bFastMemory; + int iCpuCore; +- bool bCheckForNewVersion; + bool bForceLagSync; + bool bFuncReplacements; + bool bHideSlowWarnings; +@@ -521,4 +520,3 @@ std::string CreateRandMAC(); + // TODO: Find a better place for this. + extern http::Downloader g_DownloadManager; + extern Config g_Config; +- +diff --git a/Qt/QtMain.cpp b/Qt/QtMain.cpp +index 7713b6587..1d92d1175 100644 +--- a/Qt/QtMain.cpp ++++ b/Qt/QtMain.cpp +@@ -194,12 +194,6 @@ bool System_GetPropertyBool(SystemProperty prop) { + return true; + case SYSPROP_HAS_FILE_BROWSER: + return true; +- case SYSPROP_APP_GOLD: +-#ifdef GOLD +- return true; +-#else +- return false; +-#endif + default: + return false; + } +diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp +index 52028d087..d8697d210 100644 +--- a/SDL/SDLMain.cpp ++++ b/SDL/SDLMain.cpp +@@ -356,12 +356,6 @@ bool System_GetPropertyBool(SystemProperty prop) { + switch (prop) { + case SYSPROP_HAS_BACK_BUTTON: + return true; +- case SYSPROP_APP_GOLD: +-#ifdef GOLD +- return true; +-#else +- return false; +-#endif + default: + return false; + } +diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp +index f146d099e..625ee124c 100644 +--- a/UI/DevScreens.cpp ++++ b/UI/DevScreens.cpp +@@ -603,9 +603,6 @@ void SystemInfoScreen::CreateViews() { + #ifdef _M_SSE + buildConfig->Add(new InfoItem("_M_SSE", StringFromFormat("0x%x", _M_SSE))); + #endif +- if (System_GetPropertyBool(SYSPROP_APP_GOLD)) { +- buildConfig->Add(new InfoItem("GOLD", "")); +- } + + ViewGroup *cpuExtensionsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT)); + cpuExtensionsScroll->SetTag("DevSystemInfoCPUExt"); +diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp +index 8202870c7..81112f822 100644 +--- a/UI/GameSettingsScreen.cpp ++++ b/UI/GameSettingsScreen.cpp +@@ -796,7 +796,6 @@ void GameSettingsScreen::CreateViews() { + } + #endif + +- systemSettings->Add(new CheckBox(&g_Config.bCheckForNewVersion, sy->T("VersionCheck", "Check for new versions of PPSSPP"))); + const std::string bgPng = GetSysDirectory(DIRECTORY_SYSTEM) + "background.png"; + const std::string bgJpg = GetSysDirectory(DIRECTORY_SYSTEM) + "background.jpg"; + if (File::Exists(bgPng) || File::Exists(bgJpg)) { +diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp +index 43535913d..36834020d 100644 +--- a/UI/MainScreen.cpp ++++ b/UI/MainScreen.cpp +@@ -1054,11 +1054,7 @@ void MainScreen::CreateViews() { + sprintf(versionString, "%s", PPSSPP_GIT_VERSION); + rightColumnItems->SetSpacing(0.0f); + LinearLayout *logos = new LinearLayout(ORIENT_HORIZONTAL); +- if (System_GetPropertyBool(SYSPROP_APP_GOLD)) { +- logos->Add(new ImageView(ImageID("I_ICONGOLD"), IS_DEFAULT, new AnchorLayoutParams(64, 64, 10, 10, NONE, NONE, false))); +- } else { +- logos->Add(new ImageView(ImageID("I_ICON"), IS_DEFAULT, new AnchorLayoutParams(64, 64, 10, 10, NONE, NONE, false))); +- } ++ logos->Add(new ImageView(ImageID("I_ICON"), IS_DEFAULT, new AnchorLayoutParams(64, 64, 10, 10, NONE, NONE, false))); + logos->Add(new ImageView(ImageID("I_LOGO"), IS_DEFAULT, new LinearLayoutParams(Margins(-12, 0, 0, 0)))); + rightColumnItems->Add(logos); + TextView *ver = rightColumnItems->Add(new TextView(versionString, new LinearLayoutParams(Margins(70, -6, 0, 0)))); +@@ -1070,11 +1066,6 @@ void MainScreen::CreateViews() { + rightColumnItems->Add(new Choice(mm->T("Game Settings", "Settings")))->OnClick.Handle(this, &MainScreen::OnGameSettings); + rightColumnItems->Add(new Choice(mm->T("Credits")))->OnClick.Handle(this, &MainScreen::OnCredits); + rightColumnItems->Add(new Choice(mm->T("www.ppsspp.org")))->OnClick.Handle(this, &MainScreen::OnPPSSPPOrg); +- if (!System_GetPropertyBool(SYSPROP_APP_GOLD)) { +- Choice *gold = rightColumnItems->Add(new Choice(mm->T("Buy PPSSPP Gold"))); +- gold->OnClick.Handle(this, &MainScreen::OnSupport); +- gold->SetIcon(ImageID("I_ICONGOLD")); +- } + + #if !PPSSPP_PLATFORM(UWP) + // Having an exit button is against UWP guidelines. +@@ -1099,28 +1090,6 @@ void MainScreen::CreateViews() { + } else if (tabHolder_->GetVisibility() != V_GONE) { + root_->SetDefaultFocusView(tabHolder_); + } +- +- auto u = GetI18NCategory("Upgrade"); +- +- upgradeBar_ = 0; +- if (!g_Config.upgradeMessage.empty()) { +- upgradeBar_ = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); +- +- UI::Margins textMargins(10, 5); +- UI::Margins buttonMargins(0, 0); +- UI::Drawable solid(0xFFbd9939); +- upgradeBar_->SetBG(solid); +- upgradeBar_->Add(new TextView(u->T("New version of PPSSPP available") + std::string(": ") + g_Config.upgradeVersion, new LinearLayoutParams(1.0f, textMargins))); +- upgradeBar_->Add(new Button(u->T("Download"), new LinearLayoutParams(buttonMargins)))->OnClick.Handle(this, &MainScreen::OnDownloadUpgrade); +- upgradeBar_->Add(new Button(u->T("Dismiss"), new LinearLayoutParams(buttonMargins)))->OnClick.Handle(this, &MainScreen::OnDismissUpgrade); +- +- // Slip in under root_ +- LinearLayout *newRoot = new LinearLayout(ORIENT_VERTICAL); +- newRoot->Add(root_); +- newRoot->Add(upgradeBar_); +- root_->ReplaceLayoutParams(new LinearLayoutParams(1.0)); +- root_ = newRoot; +- } + } + + UI::EventReturn MainScreen::OnAllowStorage(UI::EventParams &e) { +@@ -1128,27 +1097,6 @@ UI::EventReturn MainScreen::OnAllowStorage(UI::EventParams &e) { + return UI::EVENT_DONE; + } + +-UI::EventReturn MainScreen::OnDownloadUpgrade(UI::EventParams &e) { +-#if PPSSPP_PLATFORM(ANDROID) +- // Go to app store +- if (System_GetPropertyBool(SYSPROP_APP_GOLD)) { +- LaunchBrowser("market://details?id=org.ppsspp.ppssppgold"); +- } else { +- LaunchBrowser("market://details?id=org.ppsspp.ppsspp"); +- } +-#else +- // Go directly to ppsspp.org and let the user sort it out +- LaunchBrowser("https://www.ppsspp.org/downloads.html"); +-#endif +- return UI::EVENT_DONE; +-} +- +-UI::EventReturn MainScreen::OnDismissUpgrade(UI::EventParams &e) { +- g_Config.DismissUpgrade(); +- upgradeBar_->SetVisibility(UI::V_GONE); +- return UI::EVENT_DONE; +-} +- + void MainScreen::sendMessage(const char *message, const char *value) { + // Always call the base class method first to handle the most common messages. + UIScreenWithBackground::sendMessage(message, value); +@@ -1319,15 +1267,6 @@ UI::EventReturn MainScreen::OnCredits(UI::EventParams &e) { + return UI::EVENT_DONE; + } + +-UI::EventReturn MainScreen::OnSupport(UI::EventParams &e) { +-#ifdef __ANDROID__ +- LaunchBrowser("market://details?id=org.ppsspp.ppssppgold"); +-#else +- LaunchBrowser("https://central.ppsspp.org/buygold"); +-#endif +- return UI::EVENT_DONE; +-} +- + UI::EventReturn MainScreen::OnPPSSPPOrg(UI::EventParams &e) { + LaunchBrowser("https://www.ppsspp.org"); + return UI::EVENT_DONE; +diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp +index a6542c65d..f5f101594 100644 +--- a/UI/MiscScreens.cpp ++++ b/UI/MiscScreens.cpp +@@ -498,11 +498,7 @@ void LogoScreen::render() { + char temp[256]; + // Manually formatting UTF-8 is fun. \xXX doesn't work everywhere. + snprintf(temp, sizeof(temp), "%s Henrik Rydg%c%crd", cr->T("created", "Created by"), 0xC3, 0xA5); +- if (System_GetPropertyBool(SYSPROP_APP_GOLD)) { +- dc.Draw()->DrawImage(ImageID("I_ICONGOLD"), bounds.centerX() - 120, bounds.centerY() - 30, 1.2f, textColor, ALIGN_CENTER); +- } else { +- dc.Draw()->DrawImage(ImageID("I_ICON"), bounds.centerX() - 120, bounds.centerY() - 30, 1.2f, textColor, ALIGN_CENTER); +- } ++ dc.Draw()->DrawImage(ImageID("I_ICON"), bounds.centerX() - 120, bounds.centerY() - 30, 1.2f, textColor, ALIGN_CENTER); + dc.Draw()->DrawImage(ImageID("I_LOGO"), bounds.centerX() + 40, bounds.centerY() - 30, 1.5f, textColor, ALIGN_CENTER); + //dc.Draw()->DrawTextShadow(UBUNTU48, "PPSSPP", xres / 2, yres / 2 - 30, textColor, ALIGN_CENTER); + dc.SetFontScale(1.0f, 1.0f); +@@ -538,10 +534,6 @@ void CreditsScreen::CreateViews() { + // Really need to redo this whole layout with some linear layouts... + + int rightYOffset = 0; +- if (!System_GetPropertyBool(SYSPROP_APP_GOLD)) { +- root_->Add(new Button(cr->T("Buy Gold"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnSupport); +- rightYOffset = 74; +- } + root_->Add(new Button(cr->T("PPSSPP Forums"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 158, false)))->OnClick.Handle(this, &CreditsScreen::OnForums); + root_->Add(new Button(cr->T("Discord"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 232, false)))->OnClick.Handle(this, &CreditsScreen::OnDiscord); + root_->Add(new Button("www.ppsspp.org", new AnchorLayoutParams(260, 64, 10, NONE, NONE, 10, false)))->OnClick.Handle(this, &CreditsScreen::OnPPSSPPOrg); +@@ -550,20 +542,7 @@ void CreditsScreen::CreateViews() { + #if PPSSPP_PLATFORM(ANDROID) || PPSSPP_PLATFORM(IOS) + root_->Add(new Button(cr->T("Share PPSSPP"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, rightYOffset + 158, false)))->OnClick.Handle(this, &CreditsScreen::OnShare); + #endif +- if (System_GetPropertyBool(SYSPROP_APP_GOLD)) { +- root_->Add(new ImageView(ImageID("I_ICONGOLD"), IS_DEFAULT, new AnchorLayoutParams(100, 64, 10, 10, NONE, NONE, false))); +- } else { +- root_->Add(new ImageView(ImageID("I_ICON"), IS_DEFAULT, new AnchorLayoutParams(100, 64, 10, 10, NONE, NONE, false))); +- } +-} +- +-UI::EventReturn CreditsScreen::OnSupport(UI::EventParams &e) { +-#ifdef __ANDROID__ +- LaunchBrowser("market://details?id=org.ppsspp.ppssppgold"); +-#else +- LaunchBrowser("https://central.ppsspp.org/buygold"); +-#endif +- return UI::EVENT_DONE; ++ root_->Add(new ImageView(ImageID("I_ICON"), IS_DEFAULT, new AnchorLayoutParams(100, 64, 10, 10, NONE, NONE, false))); + } + + UI::EventReturn CreditsScreen::OnTwitter(UI::EventParams &e) { +@@ -747,11 +726,7 @@ void CreditsScreen::render() { + + // TODO: This is kinda ugly, done on every frame... + char temp[256]; +- if (System_GetPropertyBool(SYSPROP_APP_GOLD)) { +- snprintf(temp, sizeof(temp), "PPSSPP Gold %s", PPSSPP_GIT_VERSION); +- } else { +- snprintf(temp, sizeof(temp), "PPSSPP %s", PPSSPP_GIT_VERSION); +- } ++ snprintf(temp, sizeof(temp), "PPSSPP %s", PPSSPP_GIT_VERSION); + credits[0] = (const char *)temp; + + UIContext &dc = *screenManager()->getUIContext(); +diff --git a/UWP/PPSSPP_UWPMain.cpp b/UWP/PPSSPP_UWPMain.cpp +index 24f3b964d..1d66ba7ee 100644 +--- a/UWP/PPSSPP_UWPMain.cpp ++++ b/UWP/PPSSPP_UWPMain.cpp +@@ -399,12 +399,6 @@ bool System_GetPropertyBool(SystemProperty prop) { + return false; + case SYSPROP_HAS_BACK_BUTTON: + return true; +- case SYSPROP_APP_GOLD: +-#ifdef GOLD +- return true; +-#else +- return false; +-#endif + default: + return false; + } +diff --git a/Windows/MainWindowMenu.cpp b/Windows/MainWindowMenu.cpp +index b5e1bb0eb..71b29b48a 100644 +--- a/Windows/MainWindowMenu.cpp ++++ b/Windows/MainWindowMenu.cpp +@@ -1377,7 +1377,7 @@ namespace MainWindow { + { + W32Util::CenterWindow(hDlg); + HWND versionBox = GetDlgItem(hDlg, IDC_VERSION); +- std::string windowText = System_GetPropertyBool(SYSPROP_APP_GOLD) ? "PPSSPP Gold " : "PPSSPP "; ++ std::string windowText = "PPSSPP "; + windowText.append(PPSSPP_GIT_VERSION); + SetWindowText(versionBox, ConvertUTF8ToWString(windowText).c_str()); + } +diff --git a/Windows/main.cpp b/Windows/main.cpp +index 3795597e2..fd98d0453 100644 +--- a/Windows/main.cpp ++++ b/Windows/main.cpp +@@ -268,12 +268,6 @@ bool System_GetPropertyBool(SystemProperty prop) { + return true; + case SYSPROP_HAS_BACK_BUTTON: + return true; +- case SYSPROP_APP_GOLD: +-#ifdef GOLD +- return true; +-#else +- return false; +-#endif + default: + return false; + } +diff --git a/android/jni/app-android.cpp b/android/jni/app-android.cpp +index 086371085..0a340c0ae 100644 +--- a/android/jni/app-android.cpp ++++ b/android/jni/app-android.cpp +@@ -372,12 +372,6 @@ bool System_GetPropertyBool(SystemProperty prop) { + return true; + case SYSPROP_HAS_IMAGE_BROWSER: + return true; +- case SYSPROP_APP_GOLD: +-#ifdef GOLD +- return true; +-#else +- return false; +-#endif + default: + return false; + } +-- +2.26.2 + -- cgit v1.2.3 From 9299da1362b0a236cc5ba2651632bf5845fe13d4 Mon Sep 17 00:00:00 2001 From: Alberto Eleuterio Flores Guerrero Date: Wed, 17 Jun 2020 11:45:17 +0200 Subject: gnu: Add widelands. * gnu/local.mk (widelands): New variable. * gnu/packages/patches/widelands-system-wide_minizip.patch: New file. (dist_patch_DATA): Register file above. Co-authored-by: Nicolas Goaziou --- .../patches/widelands-system-wide_minizip.patch | 153 +++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 gnu/packages/patches/widelands-system-wide_minizip.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/widelands-system-wide_minizip.patch b/gnu/packages/patches/widelands-system-wide_minizip.patch new file mode 100644 index 0000000000..1fac0d5396 --- /dev/null +++ b/gnu/packages/patches/widelands-system-wide_minizip.patch @@ -0,0 +1,153 @@ +Description: use the system-wide minizip instead of the embeeded one if found. +Forwarded-Upstream: It was provided by upstream: http://bazaar.launchpad.net/~widelands-dev/widelands/b19-debian/revision/8147 + . + Thanks to Fòram na Gàidhlig for the patch. + +I just added this line to make its use easier: + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_HOME_DIRECTORY}/Modules) + +=== modified file 'CMakeLists.txt' +--- + CMakeLists.txt | 3 +++ + Modules/FindMinizip.cmake | 37 +++++++++++++++++++++++++++++++++++++ + cmake/WlFunctions.cmake | 7 +++++++ + src/io/CMakeLists.txt | 2 +- + src/third_party/CMakeLists.txt | 20 +++++++++++--------- + src/third_party/minizip/README.txt | 4 ++++ + 6 files changed, 63 insertions(+), 10 deletions(-) + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -43,6 +43,7 @@ + endif(POLICY CMP0074) + + include("${CMAKE_SOURCE_DIR}/cmake/WlFunctions.cmake") ++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_HOME_DIRECTORY}/Modules) + + option(OPTION_USE_GLBINDING "Use glbinding instead of GLEW" OFF) + option(OPTION_GLEW_STATIC "Use static GLEW Library" OFF) +@@ -105,6 +106,8 @@ + find_package(SDL2_ttf REQUIRED) + find_package(ZLIB REQUIRED) + find_package(ICU REQUIRED) ++find_package(Minizip) ++ + if(OPTION_USE_GLBINDING) + find_package(glbinding REQUIRED) + else() +--- /dev/null ++++ b/Modules/FindMinizip.cmake +@@ -0,0 +1,37 @@ ++# - Try to find Minizip ++# Once done this will define ++# ++# MINIZIP_FOUND - system has MINIZIP ++# MINIZIP_INCLUDE_DIR - the MINIZIP include directory ++# MINIZIP_LIBRARY_DIR - where the libraries are ++# MINIZIP_LIBRARY - Link these to use MINIZIP ++# ++ ++IF (MINIZIP_INCLUDE_DIR) ++ # Already in cache, be silent ++ SET(MINIZIP_FIND_QUIETLY TRUE) ++ENDIF (MINIZIP_INCLUDE_DIR) ++ ++FIND_PATH( MINIZIP_INCLUDE_DIR ++ NAMES zip.h unzip.h ioapi.h ++ PATHS /usr/local/include /usr/include ++ PATH_SUFFIXES minizip/ ) ++SET( MINIZIP_NAMES minizip MINIZIP ) ++FIND_LIBRARY( MINIZIP_LIBRARY ++ NAMES ${MINIZIP_NAMES} ++ PATHS /usr/lib /usr/local/lib ) ++ ++GET_FILENAME_COMPONENT( MINIZIP_LIBRARY_DIR ${MINIZIP_LIBRARY} PATH ) ++ ++IF (MINIZIP_INCLUDE_DIR AND MINIZIP_LIBRARY) ++ SET(MINIZIP_FOUND TRUE) ++ SET(MINIZIP_LIBRARY_DIR ${MINIZIP_LIBRARY} ) ++ IF (NOT MINIZIP_FIND_QUIETLY) ++ MESSAGE (STATUS "Found Minizip: ${MINIZIP_LIBRARY} ${MINIZIP_INCLUDE_DIR}") ++ ENDIF (NOT MINIZIP_FIND_QUIETLY) ++ELSE (MINIZIP_INCLUDE_DIR AND MINIZIP_LIBRARY) ++ SET( MINIZIP_FOUND FALSE ) ++ SET( MINIZIP_LIBRARY_DIR ) ++ SET( MINIZIP_EXTRA_DEFINITIONS ) ++ENDIF (MINIZIP_INCLUDE_DIR AND MINIZIP_LIBRARY) ++ +--- a/cmake/WlFunctions.cmake ++++ b/cmake/WlFunctions.cmake +@@ -81,6 +81,14 @@ + if(ARG_USES_ZLIB) + wl_include_system_directories(${NAME} ${ZLIB_INCLUDE_DIRS}) + target_link_libraries(${NAME} ${ZLIB_LIBRARY}) ++ if (MINIZIP_FOUND) ++ wl_include_system_directories(${NAME} ${MINIZIP_INCLUDE_DIR}) ++ target_link_libraries(${NAME} ${MINIZIP_LIBRARY}) ++ target_compile_definitions(${NAME} PUBLIC -DHAVE_SYSTEM_MINIZIP) ++ else(MINIZIP_FOUND) ++ target_link_libraries(${NAME} third_party_minizip) ++ message(FATAL_ERROR "You are using widelands-bundled minizip sources. Please install your distribution's minizip dev library or urge your distribution maintainer to include the minizip library in your package repository. Thank you.") ++ endif(MINIZIP_FOUND) + endif() + + # OpenGL and GLEW are one thing for us. If you use the one, you also use the +--- a/src/third_party/CMakeLists.txt ++++ b/src/third_party/CMakeLists.txt +@@ -1,12 +1,14 @@ +-wl_library(third_party_minizip +- THIRD_PARTY +- SRCS +- minizip/ioapi.h +- minizip/unzip.cc +- minizip/unzip.h +- minizip/zip.h +- USES_ZLIB +-) ++if(NOT MINIZIP_FOUND) ++ wl_library(third_party_minizip ++ THIRD_PARTY ++ SRCS ++ ioapi.h ++ unzip.cc ++ unzip.h ++ zip.h ++ USES_ZLIB ++ ) ++endif(NOT MINIZIP_FOUND) + + wl_library(third_party_eris + THIRD_PARTY +--- a/src/io/filesystem/CMakeLists.txt ++++ b/src/io/filesystem/CMakeLists.txt +@@ -12,6 +12,7 @@ + zip_exceptions.h + zip_filesystem.cc + zip_filesystem.h ++ USES_ZLIB + DEPENDS + base_exceptions + base_i18n +@@ -19,5 +20,4 @@ + base_macros + graphic_text_layout + io_stream +- third_party_minizip + ) +--- a/src/io/filesystem/zip_filesystem.h ++++ b/src/io/filesystem/zip_filesystem.h +@@ -28,8 +28,14 @@ + #include "io/filesystem/filesystem.h" + #include "io/streamread.h" + #include "io/streamwrite.h" ++ ++#ifndef HAVE_SYSTEM_MINIZIP + #include "third_party/minizip/unzip.h" + #include "third_party/minizip/zip.h" ++#else ++#include ++#include ++#endif + + class ZipFilesystem : public FileSystem { + public: -- cgit v1.2.3 From f74e9277c186be4bd8101fa3c6924f0cb04e4c13 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Tue, 30 Jun 2020 19:12:18 -0400 Subject: gnu: icecat: Update to 68.10.0-guix0-preview1 [security-fixes]. Includes fixes for CVE-2020-12417, CVE-2020-12418, CVE-2020-12419, CVE-2020-12420, and CVE-2020-12421. * gnu/packages/gnuzilla.scm (%icecat-version, %icecat-build-id): Update. (icecat-source): Update gnuzilla commit, base version, and hashes. Remove code that deleted the Onion Browser Button extension, which is no longer bundled upstream. * gnu/packages/patches/icecat-makeicecat.patch: Adapt to new version. --- gnu/packages/patches/icecat-makeicecat.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/icecat-makeicecat.patch b/gnu/packages/patches/icecat-makeicecat.patch index d3d95cbf28..cff0b7ad45 100644 --- a/gnu/packages/patches/icecat-makeicecat.patch +++ b/gnu/packages/patches/icecat-makeicecat.patch @@ -25,7 +25,7 @@ index 8be2362..48716f2 100755 -wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc -gpg --recv-keys --keyserver keyserver.ubuntu.com 14F26682D0916CDD81E37B6D61B7B526D98F0353 -gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc --echo -n 935105e1a8a97d64daffb372690e2b566b5f07641f01470929dbbc82d20d4407 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - +-echo -n 2ec8c2627e46e80fc208584966a2ded7a0a9ff76b55ffccec0623b89b98ded2b firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - - -echo Extracting Firefox tarball -tar -xf firefox-${FFVERSION}esr.source.tar.xz @@ -37,7 +37,7 @@ index 8be2362..48716f2 100755 +# wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc +# gpg --recv-keys --keyserver keyserver.ubuntu.com 14F26682D0916CDD81E37B6D61B7B526D98F0353 +# gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc -+# echo -n 935105e1a8a97d64daffb372690e2b566b5f07641f01470929dbbc82d20d4407 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - ++# echo -n 2ec8c2627e46e80fc208584966a2ded7a0a9ff76b55ffccec0623b89b98ded2b firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - +# +# echo Extracting Firefox tarball +# tar -xf firefox-${FFVERSION}esr.source.tar.xz -- cgit v1.2.3 From af74c0633aa62d7d4e341920cfa3265f27f793cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 2 Jul 2020 23:27:04 +0200 Subject: gnu: gash, gash-utils: Build with Guile 3.0. * gnu/packages/shells.scm (gash)[source]: Add 'modules' and 'snippet'. [inputs]: Change GUILE-2.2 to GUILE-3.0. (gash-utils)[source]: Add 'modules' and 'snippet'. [inputs]: Change GUILE-2.2 to GUILE-3.0. * gnu/packages/commencement.scm (gash-utils-boot)[source]: Remove unneeded 'modules' field, and add 'snippet'. (gash-utils-boot)[source]: New field. * gnu/packages/patches/gash-utils-ls-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/packages/patches/gash-utils-ls-test.patch | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 gnu/packages/patches/gash-utils-ls-test.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/gash-utils-ls-test.patch b/gnu/packages/patches/gash-utils-ls-test.patch new file mode 100644 index 0000000000..e1dfb9c23b --- /dev/null +++ b/gnu/packages/patches/gash-utils-ls-test.patch @@ -0,0 +1,25 @@ +'ls.scm' monkey-patches (ice-9 getopt-long) to allow it to recognize '-1' +as a valid option. Unfortunately, monkey patching no longer works with +Guile 3.0 due to inlining, so change the test to make do without '-1'. + +diff --git a/tests/core-utils.org b/tests/core-utils.org +index d35ede8..22718e3 100644 +--- a/tests/core-utils.org ++++ b/tests/core-utils.org +@@ -93,14 +93,11 @@ + * ls + :script: + #+begin_src sh +- ls -1 tests/data/star ++ ls tests/data/star + #+end_src + :stdout: + #+begin_example +- 0 +- 1 +- 2 +- 3 ++ 0 1 2 3 + #+end_example + + * test-file -- cgit v1.2.3 From 851a7caf1a1a145a815aa11bf29aeaceca94e8c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= Date: Sun, 7 Jun 2020 23:25:40 +0200 Subject: gnu: llvm-9: Backport patches to fix miscompilations. * gnu/packages/llvm.scm (llvm-9)[source]: Add new patches. * gnu/packages/patches/llvm-9-fix-lpad-miscompilation.patch, gnu/packages/patches/llvm-9-fix-scev-miscompilation.patch: New files. * gnu/local.mk (dist_patch_DATA): Register new patches. --- .../patches/llvm-9-fix-lpad-miscompilation.patch | 97 ++++++++++++++++++ .../patches/llvm-9-fix-scev-miscompilation.patch | 113 +++++++++++++++++++++ 2 files changed, 210 insertions(+) create mode 100644 gnu/packages/patches/llvm-9-fix-lpad-miscompilation.patch create mode 100644 gnu/packages/patches/llvm-9-fix-scev-miscompilation.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/llvm-9-fix-lpad-miscompilation.patch b/gnu/packages/patches/llvm-9-fix-lpad-miscompilation.patch new file mode 100644 index 0000000000..6cfe07e50a --- /dev/null +++ b/gnu/packages/patches/llvm-9-fix-lpad-miscompilation.patch @@ -0,0 +1,97 @@ +From 011fb5bf8b31316472fccb1a19c91912246df9b2 Mon Sep 17 00:00:00 2001 +From: Reid Kleckner +Date: Sat, 28 Mar 2020 11:03:14 -0700 +Subject: [PATCH] [CodeGen] Fix sinking local values in lpads with phis + +There was already a test case for landingpads to handle this case, but I +had forgotten to consider PHI instructions preceding the EH_LABEL in the +landingpad. + +PR45261 +--- + llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 17 +++++++++- + llvm/test/CodeGen/X86/sink-local-value.ll | 36 ++++++++++++++++++++++ + 2 files changed, 52 insertions(+), 1 deletion(-) + +diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +index 5ac3606dc662..2638b1e8a05c 100644 +--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp ++++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +@@ -225,6 +225,21 @@ static bool isRegUsedByPhiNodes(unsigned DefReg, + return false; + } + ++static bool isTerminatingEHLabel(MachineBasicBlock *MBB, MachineInstr &MI) { ++ // Ignore non-EH labels. ++ if (!MI.isEHLabel()) ++ return false; ++ ++ // Any EH label outside a landing pad must be for an invoke. Consider it a ++ // terminator. ++ if (!MBB->isEHPad()) ++ return true; ++ ++ // If this is a landingpad, the first non-phi instruction will be an EH_LABEL. ++ // Don't consider that label to be a terminator. ++ return MI.getIterator() != MBB->getFirstNonPHI(); ++} ++ + /// Build a map of instruction orders. Return the first terminator and its + /// order. Consider EH_LABEL instructions to be terminators as well, since local + /// values for phis after invokes must be materialized before the call. +@@ -233,7 +248,7 @@ void FastISel::InstOrderMap::initialize( + unsigned Order = 0; + for (MachineInstr &I : *MBB) { + if (!FirstTerminator && +- (I.isTerminator() || (I.isEHLabel() && &I != &MBB->front()))) { ++ (I.isTerminator() || isTerminatingEHLabel(MBB, I))) { + FirstTerminator = &I; + FirstTerminatorOrder = Order; + } +diff --git a/llvm/test/CodeGen/X86/sink-local-value.ll b/llvm/test/CodeGen/X86/sink-local-value.ll +index b0e511ac1189..f7d861ac9b6c 100644 +--- a/llvm/test/CodeGen/X86/sink-local-value.ll ++++ b/llvm/test/CodeGen/X86/sink-local-value.ll +@@ -145,6 +145,42 @@ try.cont: ; preds = %entry, %lpad + ; CHECK: retl + + ++define i32 @lpad_phi() personality i32 (...)* @__gxx_personality_v0 { ++entry: ++ store i32 42, i32* @sink_across ++ invoke void @may_throw() ++ to label %try.cont unwind label %lpad ++ ++lpad: ; preds = %entry ++ %p = phi i32 [ 11, %entry ] ; Trivial, but -O0 keeps it ++ %0 = landingpad { i8*, i32 } ++ catch i8* null ++ store i32 %p, i32* @sink_across ++ br label %try.cont ++ ++try.cont: ; preds = %entry, %lpad ++ %r.0 = phi i32 [ 13, %entry ], [ 55, %lpad ] ++ ret i32 %r.0 ++} ++ ++; The constant materialization should be *after* the stores to sink_across, but ++; before any EH_LABEL. ++ ++; CHECK-LABEL: lpad_phi: ++; CHECK: movl $42, sink_across ++; CHECK: movl $13, %{{[a-z]*}} ++; CHECK: .Ltmp{{.*}}: ++; CHECK: calll may_throw ++; CHECK: .Ltmp{{.*}}: ++; CHECK: jmp .LBB{{.*}} ++; CHECK: .LBB{{.*}}: # %lpad ++; CHECK-NEXT: .Ltmp{{.*}}: ++; CHECK: movl {{.*}}, sink_across ++; CHECK: movl $55, %{{[a-z]*}} ++; CHECK: .LBB{{.*}}: # %try.cont ++; CHECK: retl ++ ++ + ; Function Attrs: nounwind readnone speculatable + declare void @llvm.dbg.value(metadata, metadata, metadata) #0 + diff --git a/gnu/packages/patches/llvm-9-fix-scev-miscompilation.patch b/gnu/packages/patches/llvm-9-fix-scev-miscompilation.patch new file mode 100644 index 0000000000..3f16de5a2b --- /dev/null +++ b/gnu/packages/patches/llvm-9-fix-scev-miscompilation.patch @@ -0,0 +1,113 @@ +Guix note: this got detected with the test suite of rustc 1.41.1, but +the issue potentially affects all consumers of LLVM. + +From 58e8c793d0e43150a6452e971a32d7407a8a7401 Mon Sep 17 00:00:00 2001 +From: Tim Northover +Date: Mon, 30 Sep 2019 07:46:52 +0000 +Subject: [PATCH] Revert "[SCEV] add no wrap flag for SCEVAddExpr." + +This reverts r366419 because the analysis performed is within the context of +the loop and it's only valid to add wrapping flags to "global" expressions if +they're always correct. + +llvm-svn: 373184 +--- + llvm/lib/Analysis/ScalarEvolution.cpp | 2 +- + llvm/test/Analysis/ScalarEvolution/limit-depth.ll | 2 +- + llvm/test/Analysis/ScalarEvolution/nsw.ll | 2 +- + llvm/test/Analysis/ScalarEvolution/trip-count12.ll | 2 +- + llvm/test/Analysis/ScalarEvolution/trip-count9.ll | 8 ++++---- + 5 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp +index 354ae05bb841..c29fc5dbccfb 100644 +--- a/llvm/lib/Analysis/ScalarEvolution.cpp ++++ b/llvm/lib/Analysis/ScalarEvolution.cpp +@@ -4992,7 +4992,7 @@ const SCEV *ScalarEvolution::createSimpleAffineAddRec(PHINode *PN, + // overflow. + if (auto *BEInst = dyn_cast(BEValueV)) + if (isLoopInvariant(Accum, L) && isAddRecNeverPoison(BEInst, L)) +- (void)getAddRecExpr(getAddExpr(StartVal, Accum, Flags), Accum, L, Flags); ++ (void)getAddRecExpr(getAddExpr(StartVal, Accum), Accum, L, Flags); + + return PHISCEV; + } +diff --git a/llvm/test/Analysis/ScalarEvolution/limit-depth.ll b/llvm/test/Analysis/ScalarEvolution/limit-depth.ll +index db68a4f84c91..6fdf8c5df974 100644 +--- a/llvm/test/Analysis/ScalarEvolution/limit-depth.ll ++++ b/llvm/test/Analysis/ScalarEvolution/limit-depth.ll +@@ -46,7 +46,7 @@ define void @test_mul(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f) { + define void @test_sext(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f) { + ; CHECK-LABEL: @test_sext + ; CHECK: %se2 = sext i64 %iv2.inc to i128 +-; CHECK-NEXT: --> {(1 + (sext i64 {(sext i32 (1 + %a) to i64),+,1}<%loop> to i128)),+,1}<%loop2> ++; CHECK-NEXT: --> {(1 + (sext i64 {(sext i32 (1 + %a) to i64),+,1}<%loop> to i128)),+,1}<%loop2> + entry: + br label %loop + +diff --git a/llvm/test/Analysis/ScalarEvolution/nsw.ll b/llvm/test/Analysis/ScalarEvolution/nsw.ll +index 69427368625d..ca24f9d4a04b 100644 +--- a/llvm/test/Analysis/ScalarEvolution/nsw.ll ++++ b/llvm/test/Analysis/ScalarEvolution/nsw.ll +@@ -163,7 +163,7 @@ bb5: ; preds = %bb2 + declare void @f(i32) + + ; CHECK-LABEL: nswnowrap +-; CHECK: --> {(1 + %v),+,1}<%for.body>{{ U: [^ ]+ S: [^ ]+}}{{ *}}Exits: (2 + %v) ++; CHECK: --> {(1 + %v),+,1}<%for.body>{{ U: [^ ]+ S: [^ ]+}}{{ *}}Exits: (1 + ((1 + %v) smax %v)) + define void @nswnowrap(i32 %v, i32* %buf) { + entry: + %add = add nsw i32 %v, 1 +diff --git a/llvm/test/Analysis/ScalarEvolution/trip-count12.ll b/llvm/test/Analysis/ScalarEvolution/trip-count12.ll +index 5e7d72d5e4f3..d0086ee2e6ac 100644 +--- a/llvm/test/Analysis/ScalarEvolution/trip-count12.ll ++++ b/llvm/test/Analysis/ScalarEvolution/trip-count12.ll +@@ -1,7 +1,7 @@ + ; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s + + ; CHECK: Determining loop execution counts for: @test +-; CHECK: Loop %for.body: backedge-taken count is ((-2 + %len) /u 2) ++; CHECK: Loop %for.body: backedge-taken count is ((-2 + %len) /u 2) + ; CHECK: Loop %for.body: max backedge-taken count is 1073741823 + + define zeroext i16 @test(i16* nocapture %p, i32 %len) nounwind readonly { +diff --git a/llvm/test/Analysis/ScalarEvolution/trip-count9.ll b/llvm/test/Analysis/ScalarEvolution/trip-count9.ll +index c0a1d12fa00e..9a080b34743f 100644 +--- a/llvm/test/Analysis/ScalarEvolution/trip-count9.ll ++++ b/llvm/test/Analysis/ScalarEvolution/trip-count9.ll +@@ -179,7 +179,7 @@ exit: + } + + ; CHECK: Determining loop execution counts for: @nsw_startx +-; CHECK: Loop %loop: backedge-taken count is (-1 + (-1 * %x) + ((1 + %x) smax %n)) ++; CHECK: Loop %loop: backedge-taken count is (-1 + (-1 * %x) + ((1 + %x) smax %n)) + ; CHECK: Loop %loop: max backedge-taken count is -1 + define void @nsw_startx(i4 %n, i4 %x) { + entry: +@@ -195,7 +195,7 @@ exit: + } + + ; CHECK: Determining loop execution counts for: @nsw_startx_step2 +-; CHECK: Loop %loop: backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x) smax %n)) /u 2) ++; CHECK: Loop %loop: backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x) smax %n)) /u 2) + ; CHECK: Loop %loop: max backedge-taken count is 7 + define void @nsw_startx_step2(i4 %n, i4 %x) { + entry: +@@ -381,7 +381,7 @@ exit: + } + + ; CHECK: Determining loop execution counts for: @even_nsw_startx +-; CHECK: Loop %loop: backedge-taken count is (-1 + (-1 * %x) + ((1 + %x) smax (2 * %n))) ++; CHECK: Loop %loop: backedge-taken count is (-1 + (-1 * %x) + ((1 + %x) smax (2 * %n))) + ; CHECK: Loop %loop: max backedge-taken count is -2 + define void @even_nsw_startx(i4 %n, i4 %x) { + entry: +@@ -398,7 +398,7 @@ exit: + } + + ; CHECK: Determining loop execution counts for: @even_nsw_startx_step2 +-; CHECK: Loop %loop: backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x) smax (2 * %n))) /u 2) ++; CHECK: Loop %loop: backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x) smax (2 * %n))) /u 2) + ; CHECK: Loop %loop: max backedge-taken count is 7 + define void @even_nsw_startx_step2(i4 %n, i4 %x) { + entry: -- cgit v1.2.3 From ff2f86114c0d250351661a81bb95c627141179d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= Date: Fri, 3 Jul 2020 01:04:49 +0200 Subject: gnu: llvm-9: Backport patch to fix miscompilation for big-endian targets. * gnu/packages/llvm.scm (llvm-9)[source]: Add new patch. * gnu/packages/patches/llvm-9-fix-bitcast-miscompilation.patch: New file. * gnu/local.mk (dist_patch_DATA): Register new file. --- .../llvm-9-fix-bitcast-miscompilation.patch | 192 +++++++++++++++++++++ 1 file changed, 192 insertions(+) create mode 100644 gnu/packages/patches/llvm-9-fix-bitcast-miscompilation.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/llvm-9-fix-bitcast-miscompilation.patch b/gnu/packages/patches/llvm-9-fix-bitcast-miscompilation.patch new file mode 100644 index 0000000000..fe381acf1b --- /dev/null +++ b/gnu/packages/patches/llvm-9-fix-bitcast-miscompilation.patch @@ -0,0 +1,192 @@ +From f8e146f3430de3a6cd904f3f3f7aa1bfaefee14c Mon Sep 17 00:00:00 2001 +From: Bjorn Pettersson +Date: Thu, 28 Nov 2019 23:18:28 +0100 +Subject: [PATCH] [InstCombine] Fix big-endian miscompile of (bitcast + (zext/trunc (bitcast))) + +Summary: +optimizeVectorResize is rewriting patterns like: + %1 = bitcast vector %src to integer + %2 = trunc/zext %1 + %dst = bitcast %2 to vector + +Since bitcasting between integer an vector types gives +different integer values depending on endianness, we need +to take endianness into account. As it happens the old +implementation only produced the correct result for little +endian targets. + +Fixes: https://bugs.llvm.org/show_bug.cgi?id=44178 + +Reviewers: spatel, lattner, lebedev.ri + +Reviewed By: spatel, lebedev.ri + +Subscribers: lebedev.ri, hiraditya, uabelho, llvm-commits + +Tags: #llvm + +Differential Revision: https://reviews.llvm.org/D70844 + +(cherry picked from commit a9d6b0e5444741d08ff1df7cf71d1559e7fefc1f) +--- + .../InstCombine/InstCombineCasts.cpp | 79 +++++++++++++------ + llvm/test/Transforms/InstCombine/cast.ll | 6 +- + 2 files changed, 60 insertions(+), 25 deletions(-) + +diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp +index 2c9ba203fbf3..0af3de300e77 100644 +--- a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp ++++ b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp +@@ -18,6 +18,7 @@ + #include "llvm/IR/DIBuilder.h" + #include "llvm/IR/PatternMatch.h" + #include "llvm/Support/KnownBits.h" ++#include + using namespace llvm; + using namespace PatternMatch; + +@@ -1820,12 +1821,24 @@ Instruction *InstCombiner::visitPtrToInt(PtrToIntInst &CI) { + } + + /// This input value (which is known to have vector type) is being zero extended +-/// or truncated to the specified vector type. ++/// or truncated to the specified vector type. Since the zext/trunc is done ++/// using an integer type, we have a (bitcast(cast(bitcast))) pattern, ++/// endianness will impact which end of the vector that is extended or ++/// truncated. ++/// ++/// A vector is always stored with index 0 at the lowest address, which ++/// corresponds to the most significant bits for a big endian stored integer and ++/// the least significant bits for little endian. A trunc/zext of an integer ++/// impacts the big end of the integer. Thus, we need to add/remove elements at ++/// the front of the vector for big endian targets, and the back of the vector ++/// for little endian targets. ++/// + /// Try to replace it with a shuffle (and vector/vector bitcast) if possible. + /// + /// The source and destination vector types may have different element types. +-static Instruction *optimizeVectorResize(Value *InVal, VectorType *DestTy, +- InstCombiner &IC) { ++static Instruction *optimizeVectorResizeWithIntegerBitCasts(Value *InVal, ++ VectorType *DestTy, ++ InstCombiner &IC) { + // We can only do this optimization if the output is a multiple of the input + // element size, or the input is a multiple of the output element size. + // Convert the input type to have the same element type as the output. +@@ -1844,31 +1857,53 @@ static Instruction *optimizeVectorResize(Value *InVal, VectorType *DestTy, + InVal = IC.Builder.CreateBitCast(InVal, SrcTy); + } + ++ bool IsBigEndian = IC.getDataLayout().isBigEndian(); ++ unsigned SrcElts = SrcTy->getNumElements(); ++ unsigned DestElts = DestTy->getNumElements(); ++ ++ assert(SrcElts != DestElts && "Element counts should be different."); ++ + // Now that the element types match, get the shuffle mask and RHS of the + // shuffle to use, which depends on whether we're increasing or decreasing the + // size of the input. +- SmallVector ShuffleMask; ++ SmallVector ShuffleMaskStorage; ++ ArrayRef ShuffleMask; + Value *V2; + +- if (SrcTy->getNumElements() > DestTy->getNumElements()) { +- // If we're shrinking the number of elements, just shuffle in the low +- // elements from the input and use undef as the second shuffle input. +- V2 = UndefValue::get(SrcTy); +- for (unsigned i = 0, e = DestTy->getNumElements(); i != e; ++i) +- ShuffleMask.push_back(i); ++ // Produce an identify shuffle mask for the src vector. ++ ShuffleMaskStorage.resize(SrcElts); ++ std::iota(ShuffleMaskStorage.begin(), ShuffleMaskStorage.end(), 0); + ++ if (SrcElts > DestElts) { ++ // If we're shrinking the number of elements (rewriting an integer ++ // truncate), just shuffle in the elements corresponding to the least ++ // significant bits from the input and use undef as the second shuffle ++ // input. ++ V2 = UndefValue::get(SrcTy); ++ // Make sure the shuffle mask selects the "least significant bits" by ++ // keeping elements from back of the src vector for big endian, and from the ++ // front for little endian. ++ ShuffleMask = ShuffleMaskStorage; ++ if (IsBigEndian) ++ ShuffleMask = ShuffleMask.take_back(DestElts); ++ else ++ ShuffleMask = ShuffleMask.take_front(DestElts); + } else { +- // If we're increasing the number of elements, shuffle in all of the +- // elements from InVal and fill the rest of the result elements with zeros +- // from a constant zero. ++ // If we're increasing the number of elements (rewriting an integer zext), ++ // shuffle in all of the elements from InVal. Fill the rest of the result ++ // elements with zeros from a constant zero. + V2 = Constant::getNullValue(SrcTy); +- unsigned SrcElts = SrcTy->getNumElements(); +- for (unsigned i = 0, e = SrcElts; i != e; ++i) +- ShuffleMask.push_back(i); +- +- // The excess elements reference the first element of the zero input. +- for (unsigned i = 0, e = DestTy->getNumElements()-SrcElts; i != e; ++i) +- ShuffleMask.push_back(SrcElts); ++ // Use first elt from V2 when indicating zero in the shuffle mask. ++ uint32_t NullElt = SrcElts; ++ // Extend with null values in the "most significant bits" by adding elements ++ // in front of the src vector for big endian, and at the back for little ++ // endian. ++ unsigned DeltaElts = DestElts - SrcElts; ++ if (IsBigEndian) ++ ShuffleMaskStorage.insert(ShuffleMaskStorage.begin(), DeltaElts, NullElt); ++ else ++ ShuffleMaskStorage.append(DeltaElts, NullElt); ++ ShuffleMask = ShuffleMaskStorage; + } + + return new ShuffleVectorInst(InVal, V2, +@@ -2359,8 +2394,8 @@ Instruction *InstCombiner::visitBitCast(BitCastInst &CI) { + CastInst *SrcCast = cast(Src); + if (BitCastInst *BCIn = dyn_cast(SrcCast->getOperand(0))) + if (isa(BCIn->getOperand(0)->getType())) +- if (Instruction *I = optimizeVectorResize(BCIn->getOperand(0), +- cast(DestTy), *this)) ++ if (Instruction *I = optimizeVectorResizeWithIntegerBitCasts( ++ BCIn->getOperand(0), cast(DestTy), *this)) + return I; + } + +diff --git a/llvm/test/Transforms/InstCombine/cast.ll b/llvm/test/Transforms/InstCombine/cast.ll +index b6d1eda0601d..3ce8de033422 100644 +--- a/llvm/test/Transforms/InstCombine/cast.ll ++++ b/llvm/test/Transforms/InstCombine/cast.ll +@@ -824,7 +824,7 @@ define i64 @test59(i8 %A, i8 %B) { + + define <3 x i32> @test60(<4 x i32> %call4) { + ; CHECK-LABEL: @test60( +-; CHECK-NEXT: [[P10:%.*]] = shufflevector <4 x i32> [[CALL4:%.*]], <4 x i32> undef, <3 x i32> ++; CHECK-NEXT: [[P10:%.*]] = shufflevector <4 x i32> [[CALL4:%.*]], <4 x i32> undef, <3 x i32> + ; CHECK-NEXT: ret <3 x i32> [[P10]] + ; + %p11 = bitcast <4 x i32> %call4 to i128 +@@ -836,7 +836,7 @@ define <3 x i32> @test60(<4 x i32> %call4) { + + define <4 x i32> @test61(<3 x i32> %call4) { + ; CHECK-LABEL: @test61( +-; CHECK-NEXT: [[P10:%.*]] = shufflevector <3 x i32> [[CALL4:%.*]], <3 x i32> , <4 x i32> ++; CHECK-NEXT: [[P10:%.*]] = shufflevector <3 x i32> [[CALL4:%.*]], <3 x i32> , <4 x i32> + ; CHECK-NEXT: ret <4 x i32> [[P10]] + ; + %p11 = bitcast <3 x i32> %call4 to i96 +@@ -848,7 +848,7 @@ define <4 x i32> @test61(<3 x i32> %call4) { + define <4 x i32> @test62(<3 x float> %call4) { + ; CHECK-LABEL: @test62( + ; CHECK-NEXT: [[TMP1:%.*]] = bitcast <3 x float> [[CALL4:%.*]] to <3 x i32> +-; CHECK-NEXT: [[P10:%.*]] = shufflevector <3 x i32> [[TMP1]], <3 x i32> , <4 x i32> ++; CHECK-NEXT: [[P10:%.*]] = shufflevector <3 x i32> [[TMP1]], <3 x i32> , <4 x i32> + ; CHECK-NEXT: ret <4 x i32> [[P10]] + ; + %p11 = bitcast <3 x float> %call4 to i96 +-- +2.26.2 + -- cgit v1.2.3 From 54e70a70f2cb6336b02ed3ac4256f6b44da5c769 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Wed, 8 Jul 2020 11:18:18 +0200 Subject: gnu: grub: Fix native compilation of EFI variant on i686-linux. This fixes a regression introduce in d613991a8ebe5d4b3a7706f8f0dd52f16fc1c50a reported on IRC by Mathieu Othacehe . * gnu/packages/patches/grub-cross-system-i686.patch [GRUB_MACHINE_EFI && !__x86_64__]: Add missing .byte alternative to 64-bit instruction. --- gnu/packages/patches/grub-cross-system-i686.patch | 31 ++++++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/grub-cross-system-i686.patch b/gnu/packages/patches/grub-cross-system-i686.patch index a376cae1db..2715345d63 100644 --- a/gnu/packages/patches/grub-cross-system-i686.patch +++ b/gnu/packages/patches/grub-cross-system-i686.patch @@ -2,18 +2,20 @@ Not upstreamed. Fixes cross-build for the Hurd, from i686-linux, see . -From 270667540146f8ef9ea7a44258a71b3837a7af4a Mon Sep 17 00:00:00 2001 +From 17b242e7b80108f1467037e15b605595e4823b2e Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Sun, 21 Jun 2020 15:10:40 +0200 -Subject: [PATCH] grub-core: Build fixes for i386 +Subject: [PATCH v2] grub-core: Build fixes for i386 +Content-Transfer-Encoding: 8bit +Content-Type: text/plain; charset=UTF-8 * grub-core/lib/i386/relocator64.S: Avoid x86_64 instructions on i386. --- - grub-core/lib/i386/relocator64.S | 26 +++++++++++++++++++++++++- - 1 file changed, 25 insertions(+), 1 deletion(-) + grub-core/lib/i386/relocator64.S | 33 +++++++++++++++++++++++++++++++- + 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/grub-core/lib/i386/relocator64.S b/grub-core/lib/i386/relocator64.S -index 148f38adb..45fed9444 100644 +index 148f38adb..ea39908c1 100644 --- a/grub-core/lib/i386/relocator64.S +++ b/grub-core/lib/i386/relocator64.S @@ -63,7 +63,9 @@ VARIABLE(grub_relocator64_cr3) @@ -41,7 +43,22 @@ index 148f38adb..45fed9444 100644 #ifdef GRUB_MACHINE_EFI jmp LOCAL(skip_efi_stack_align) -@@ -95,8 +104,15 @@ LOCAL(skip_efi_stack_align): +@@ -85,7 +94,14 @@ VARIABLE(grub_relocator64_rsp) + */ + VARIABLE(grub_relocator64_efi_start) + /* Align the stack as UEFI spec requires. */ ++#ifndef __x86_64__ ++ .byte 0x48 ++ .byte 0x83 ++ .byte 0xe4 ++ .byte 0xf0 ++#else + andq $~15, %rsp ++#endif + + LOCAL(skip_efi_stack_align): + #endif +@@ -95,8 +111,15 @@ LOCAL(skip_efi_stack_align): VARIABLE(grub_relocator64_rsi) .quad 0 @@ -58,7 +75,7 @@ index 148f38adb..45fed9444 100644 /* mov imm64, %rax */ .byte 0x48 .byte 0xb8 -@@ -128,6 +144,14 @@ VARIABLE(grub_relocator64_rdx) +@@ -128,6 +151,14 @@ VARIABLE(grub_relocator64_rdx) #ifdef __APPLE__ .byte 0xff, 0x25 .quad 0 -- cgit v1.2.3 From bce3c9748b4ba47cdb915492e5c7baaf3d3a2511 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Thu, 9 Jul 2020 16:07:30 -0700 Subject: gnu: u-boot: Update to 2020.07. * gnu/packages/bootloaders (u-boot): Update to 2020.07. (u-boot-pinebook-pro-rk3399): Remove patches. * gnu/packages/patches: u-boot-DT-for-Pinebook-Pro.patch, u-boot-add-boe-nv140fhmn49-display.patch, u-boot-gpio-keys-binding-cons.patch, u-boot-leds-common-binding-con.patch, u-boot-support-Pinebook-Pro-laptop.patch, u-boot-video-rockchip-fix-build.patch: Remove patches. u-boot-riscv64-fix-extlinux.patch: Refresh patch. * gnu/local.mk (dist_patch_DATA): Update accordingly. --- .../patches/u-boot-DT-for-Pinebook-Pro.patch | 1132 -------------------- .../u-boot-add-boe-nv140fhmn49-display.patch | 29 - .../patches/u-boot-gpio-keys-binding-cons.patch | 37 - .../patches/u-boot-leds-common-binding-con.patch | 115 -- .../patches/u-boot-riscv64-fix-extlinux.patch | 14 - .../u-boot-support-Pinebook-Pro-laptop.patch | 367 ------- .../patches/u-boot-video-rockchip-fix-build.patch | 48 - 7 files changed, 1742 deletions(-) delete mode 100644 gnu/packages/patches/u-boot-DT-for-Pinebook-Pro.patch delete mode 100644 gnu/packages/patches/u-boot-add-boe-nv140fhmn49-display.patch delete mode 100644 gnu/packages/patches/u-boot-gpio-keys-binding-cons.patch delete mode 100644 gnu/packages/patches/u-boot-leds-common-binding-con.patch delete mode 100644 gnu/packages/patches/u-boot-support-Pinebook-Pro-laptop.patch delete mode 100644 gnu/packages/patches/u-boot-video-rockchip-fix-build.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/u-boot-DT-for-Pinebook-Pro.patch b/gnu/packages/patches/u-boot-DT-for-Pinebook-Pro.patch deleted file mode 100644 index f88d12f1e2..0000000000 --- a/gnu/packages/patches/u-boot-DT-for-Pinebook-Pro.patch +++ /dev/null @@ -1,1132 +0,0 @@ -From b128c2e0b480ee992fabe554d19cd471efb11095 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Mon, 20 Apr 2020 20:27:35 +0100 -Origin: https://patchwork.ozlabs.org/project/uboot/patch/20200420192736.962307-5-pbrobinson@gmail.com/ -Subject: [PATCH 4/5] arm: dts: rockchip: Add initial DT for Pinebook Pro - -Sync initial support for Pinebook Pro device tree from Linux 5.7-rc1. - -Signed-off-by: Peter Robinson ---- - arch/arm/dts/Makefile | 1 + - arch/arm/dts/rk3399-pinebook-pro.dts | 1096 ++++++++++++++++++++++++++ - 2 files changed, 1097 insertions(+) - create mode 100644 arch/arm/dts/rk3399-pinebook-pro.dts - -diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index 820ee9733a..885bf0ef58 100644 ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -125,6 +125,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \ - rk3399-nanopi-m4.dtb \ - rk3399-nanopi-neo4.dtb \ - rk3399-orangepi.dtb \ -+ rk3399-pinebook-pro.dtb \ - rk3399-puma-ddr1333.dtb \ - rk3399-puma-ddr1600.dtb \ - rk3399-puma-ddr1866.dtb \ -diff --git a/arch/arm/dts/rk3399-pinebook-pro.dts b/arch/arm/dts/rk3399-pinebook-pro.dts -new file mode 100644 -index 0000000000..294d21bf45 ---- /dev/null -+++ b/arch/arm/dts/rk3399-pinebook-pro.dts -@@ -0,0 +1,1096 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+/* -+ * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd. -+ * Copyright (c) 2018 Akash Gajjar -+ * Copyright (c) 2020 Tobias Schramm -+ */ -+ -+/dts-v1/; -+#include -+#include -+#include -+#include -+#include -+#include "rk3399.dtsi" -+#include "rk3399-opp.dtsi" -+ -+/ { -+ model = "Pine64 Pinebook Pro"; -+ compatible = "pine64,pinebook-pro", "rockchip,rk3399"; -+ -+ chosen { -+ stdout-path = "serial2:1500000n8"; -+ }; -+ -+ backlight: edp-backlight { -+ compatible = "pwm-backlight"; -+ power-supply = <&vcc_12v>; -+ pwms = <&pwm0 0 740740 0>; -+ }; -+ -+ edp_panel: edp-panel { -+ compatible = "boe,nv140fhmn49"; -+ backlight = <&backlight>; -+ enable-gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&panel_en_gpio>; -+ power-supply = <&vcc3v3_panel>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ panel_in_edp: endpoint@0 { -+ reg = <0>; -+ remote-endpoint = <&edp_out_panel>; -+ }; -+ }; -+ }; -+ }; -+ -+ /* -+ * Use separate nodes for gpio-keys to allow for selective deactivation -+ * of wakeup sources via sysfs without disabling the whole key -+ */ -+ gpio-key-lid { -+ compatible = "gpio-keys"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&lidbtn_gpio>; -+ -+ lid { -+ debounce-interval = <20>; -+ gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_LOW>; -+ label = "Lid"; -+ linux,code = ; -+ linux,input-type = ; -+ wakeup-event-action = ; -+ wakeup-source; -+ }; -+ }; -+ -+ gpio-key-power { -+ compatible = "gpio-keys"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pwrbtn_gpio>; -+ -+ power { -+ debounce-interval = <20>; -+ gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; -+ label = "Power"; -+ linux,code = ; -+ wakeup-source; -+ }; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pwrled_gpio &slpled_gpio>; -+ -+ green-led { -+ color = ; -+ default-state = "on"; -+ function = LED_FUNCTION_POWER; -+ gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>; -+ label = "green:power"; -+ }; -+ -+ red-led { -+ color = ; -+ default-state = "off"; -+ function = LED_FUNCTION_STANDBY; -+ gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; -+ label = "red:standby"; -+ panic-indicator; -+ retain-state-suspended; -+ }; -+ }; -+ -+ /* Power sequence for SDIO WiFi module */ -+ sdio_pwrseq: sdio-pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ clocks = <&rk808 1>; -+ clock-names = "ext_clock"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&wifi_enable_h_gpio>; -+ post-power-on-delay-ms = <100>; -+ power-off-delay-us = <500000>; -+ -+ /* WL_REG_ON on module */ -+ reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; -+ }; -+ -+ /* Audio components */ -+ es8316-sound { -+ compatible = "simple-audio-card"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&hp_det_gpio>; -+ simple-audio-card,name = "rockchip,es8316-codec"; -+ simple-audio-card,format = "i2s"; -+ simple-audio-card,mclk-fs = <256>; -+ -+ simple-audio-card,widgets = -+ "Microphone", "Mic Jack", -+ "Headphone", "Headphones", -+ "Speaker", "Speaker"; -+ simple-audio-card,routing = -+ "MIC1", "Mic Jack", -+ "Headphones", "HPOL", -+ "Headphones", "HPOR", -+ "Speaker Amplifier INL", "HPOL", -+ "Speaker Amplifier INR", "HPOR", -+ "Speaker", "Speaker Amplifier OUTL", -+ "Speaker", "Speaker Amplifier OUTR"; -+ -+ simple-audio-card,hp-det-gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; -+ simple-audio-card,aux-devs = <&speaker_amp>; -+ simple-audio-card,pin-switches = "Speaker"; -+ -+ simple-audio-card,cpu { -+ sound-dai = <&i2s1>; -+ }; -+ -+ simple-audio-card,codec { -+ sound-dai = <&es8316>; -+ }; -+ }; -+ -+ speaker_amp: speaker-amplifier { -+ compatible = "simple-audio-amplifier"; -+ enable-gpios = <&gpio4 RK_PD3 GPIO_ACTIVE_HIGH>; -+ sound-name-prefix = "Speaker Amplifier"; -+ VCC-supply = <&pa_5v>; -+ }; -+ -+ /* Power tree */ -+ /* Root power source */ -+ vcc_sysin: vcc-sysin { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc_sysin"; -+ regulator-always-on; -+ regulator-boot-on; -+ }; -+ -+ /* Regulators supplied by vcc_sysin */ -+ /* LCD backlight supply */ -+ vcc_12v: vcc-12v { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc_12v"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <12000000>; -+ regulator-max-microvolt = <12000000>; -+ vin-supply = <&vcc_sysin>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ /* Main 3.3 V supply */ -+ vcc3v3_sys: wifi_bat: vcc3v3-sys { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc3v3_sys"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ vin-supply = <&vcc_sysin>; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ }; -+ }; -+ -+ /* 5 V USB power supply */ -+ vcc5v0_usb: pa_5v: vcc5v0-usb-regulator { -+ compatible = "regulator-fixed"; -+ enable-active-high; -+ gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pwr_5v_gpio>; -+ regulator-name = "vcc5v0_usb"; -+ regulator-always-on; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ vin-supply = <&vcc_sysin>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ /* RK3399 logic supply */ -+ vdd_log: vdd-log { -+ compatible = "pwm-regulator"; -+ pwms = <&pwm2 0 25000 1>; -+ regulator-name = "vdd_log"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <800000>; -+ regulator-max-microvolt = <1400000>; -+ vin-supply = <&vcc_sysin>; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ }; -+ }; -+ -+ /* Regulators supplied by vcc3v3_sys */ -+ /* 0.9 V supply, always on */ -+ vcc_0v9: vcc-0v9 { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc_0v9"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <900000>; -+ regulator-max-microvolt = <900000>; -+ vin-supply = <&vcc3v3_sys>; -+ }; -+ -+ /* S3 1.8 V supply, switched by vcc1v8_s3 */ -+ vcca1v8_s3: vcc1v8-s3 { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcca1v8_s3"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ vin-supply = <&vcc3v3_sys>; -+ }; -+ -+ /* micro SD card power */ -+ vcc3v0_sd: vcc3v0-sd { -+ compatible = "regulator-fixed"; -+ enable-active-high; -+ gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sdmmc0_pwr_h_gpio>; -+ regulator-name = "vcc3v0_sd"; -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ vin-supply = <&vcc3v3_sys>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ /* LCD panel power, called VCC3V3_S0 in schematic */ -+ vcc3v3_panel: vcc3v3-panel { -+ compatible = "regulator-fixed"; -+ enable-active-high; -+ gpio = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&lcdvcc_en_gpio>; -+ regulator-name = "vcc3v3_panel"; -+ regulator-always-on; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-enable-ramp-delay = <100000>; -+ vin-supply = <&vcc3v3_sys>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ /* M.2 adapter power, switched by vcc1v8_s3 */ -+ vcc3v3_ssd: vcc3v3-ssd { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc3v3_ssd"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ vin-supply = <&vcc3v3_sys>; -+ }; -+ -+ /* Regulators supplied by vcc5v0_usb */ -+ /* USB 3 port power supply regulator */ -+ vcc5v0_otg: vcc5v0-otg { -+ compatible = "regulator-fixed"; -+ enable-active-high; -+ gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&vcc5v0_host_en_gpio>; -+ regulator-name = "vcc5v0_otg"; -+ regulator-always-on; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ vin-supply = <&vcc5v0_usb>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ /* Regulators supplied by vcc5v0_usb */ -+ /* Type C port power supply regulator */ -+ vbus_5vout: vbus_typec: vbus-5vout { -+ compatible = "regulator-fixed"; -+ enable-active-high; -+ gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&vcc5v0_typec0_en_gpio>; -+ regulator-name = "vbus_5vout"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ vin-supply = <&vcc5v0_usb>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ /* Regulators supplied by vcc_1v8 */ -+ /* Primary 0.9 V LDO */ -+ vcca0v9_s3: vcca0v9-s3 { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc0v9_s3"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ vin-supply = <&vcc_1v8>; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ }; -+ }; -+ -+ mains_charger: dc-charger { -+ compatible = "gpio-charger"; -+ charger-type = "mains"; -+ gpios = <&gpio4 RK_PD0 GPIO_ACTIVE_LOW>; -+ -+ /* Also triggered by USB charger */ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&dc_det_gpio>; -+ }; -+}; -+ -+&cdn_dp { -+ status = "okay"; -+}; -+ -+&cpu_b0 { -+ cpu-supply = <&vdd_cpu_b>; -+}; -+ -+&cpu_b1 { -+ cpu-supply = <&vdd_cpu_b>; -+}; -+ -+&cpu_l0 { -+ cpu-supply = <&vdd_cpu_l>; -+}; -+ -+&cpu_l1 { -+ cpu-supply = <&vdd_cpu_l>; -+}; -+ -+&cpu_l2 { -+ cpu-supply = <&vdd_cpu_l>; -+}; -+ -+&cpu_l3 { -+ cpu-supply = <&vdd_cpu_l>; -+}; -+ -+&edp { -+ force-hpd; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&edp_hpd>; -+ status = "okay"; -+ -+ ports { -+ edp_out: port@1 { -+ reg = <1>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ edp_out_panel: endpoint@0 { -+ reg = <0>; -+ remote-endpoint = <&panel_in_edp>; -+ }; -+ }; -+ }; -+}; -+ -+&emmc_phy { -+ status = "okay"; -+}; -+ -+&gpu { -+ mali-supply = <&vdd_gpu>; -+ status = "okay"; -+}; -+ -+&hdmi_sound { -+ status = "okay"; -+}; -+ -+&i2c0 { -+ clock-frequency = <400000>; -+ i2c-scl-falling-time-ns = <4>; -+ i2c-scl-rising-time-ns = <168>; -+ status = "okay"; -+ -+ rk808: pmic@1b { -+ compatible = "rockchip,rk808"; -+ reg = <0x1b>; -+ #clock-cells = <1>; -+ clock-output-names = "xin32k", "rk808-clkout2"; -+ interrupt-parent = <&gpio3>; -+ interrupts = <10 IRQ_TYPE_LEVEL_LOW>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pmic_int_l_gpio>; -+ rockchip,system-power-controller; -+ wakeup-source; -+ -+ vcc1-supply = <&vcc_sysin>; -+ vcc2-supply = <&vcc_sysin>; -+ vcc3-supply = <&vcc_sysin>; -+ vcc4-supply = <&vcc_sysin>; -+ vcc6-supply = <&vcc_sysin>; -+ vcc7-supply = <&vcc_sysin>; -+ vcc8-supply = <&vcc3v3_sys>; -+ vcc9-supply = <&vcc_sysin>; -+ vcc10-supply = <&vcc_sysin>; -+ vcc11-supply = <&vcc_sysin>; -+ vcc12-supply = <&vcc3v3_sys>; -+ vcc13-supply = <&vcc_sysin>; -+ vcc14-supply = <&vcc_sysin>; -+ -+ regulators { -+ /* rk3399 center logic supply */ -+ vdd_center: DCDC_REG1 { -+ regulator-name = "vdd_center"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <750000>; -+ regulator-max-microvolt = <1350000>; -+ regulator-ramp-delay = <6001>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vdd_cpu_l: DCDC_REG2 { -+ regulator-name = "vdd_cpu_l"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <750000>; -+ regulator-max-microvolt = <1350000>; -+ regulator-ramp-delay = <6001>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vcc_ddr: DCDC_REG3 { -+ regulator-name = "vcc_ddr"; -+ regulator-always-on; -+ regulator-boot-on; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ }; -+ }; -+ -+ vcc_1v8: vcc_wl: DCDC_REG4 { -+ regulator-name = "vcc_1v8"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <1800000>; -+ }; -+ }; -+ -+ /* not used */ -+ LDO_REG1 { -+ }; -+ -+ /* not used */ -+ LDO_REG2 { -+ }; -+ -+ vcc1v8_pmupll: LDO_REG3 { -+ regulator-name = "vcc1v8_pmupll"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <1800000>; -+ }; -+ }; -+ -+ vcc_sdio: LDO_REG4 { -+ regulator-name = "vcc_sdio"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <3000000>; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <3000000>; -+ }; -+ }; -+ -+ vcca3v0_codec: LDO_REG5 { -+ regulator-name = "vcca3v0_codec"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vcc_1v5: LDO_REG6 { -+ regulator-name = "vcc_1v5"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <1500000>; -+ regulator-max-microvolt = <1500000>; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <1500000>; -+ }; -+ }; -+ -+ vcca1v8_codec: LDO_REG7 { -+ regulator-name = "vcca1v8_codec"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vcc_3v0: LDO_REG8 { -+ regulator-name = "vcc_3v0"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <3000000>; -+ }; -+ }; -+ -+ vcc3v3_s3: SWITCH_REG1 { -+ regulator-name = "vcc3v3_s3"; -+ regulator-always-on; -+ regulator-boot-on; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vcc3v3_s0: SWITCH_REG2 { -+ regulator-name = "vcc3v3_s0"; -+ regulator-always-on; -+ regulator-boot-on; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ }; -+ }; -+ -+ vdd_cpu_b: regulator@40 { -+ compatible = "silergy,syr827"; -+ reg = <0x40>; -+ fcs,suspend-voltage-selector = <1>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&vsel1_gpio>; -+ regulator-name = "vdd_cpu_b"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <712500>; -+ regulator-max-microvolt = <1500000>; -+ regulator-ramp-delay = <1000>; -+ vin-supply = <&vcc_1v8>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vdd_gpu: regulator@41 { -+ compatible = "silergy,syr828"; -+ reg = <0x41>; -+ fcs,suspend-voltage-selector = <1>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&vsel2_gpio>; -+ regulator-name = "vdd_gpu"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <712500>; -+ regulator-max-microvolt = <1500000>; -+ regulator-ramp-delay = <1000>; -+ vin-supply = <&vcc_1v8>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+}; -+ -+&i2c1 { -+ clock-frequency = <100000>; -+ i2c-scl-falling-time-ns = <4>; -+ i2c-scl-rising-time-ns = <168>; -+ status = "okay"; -+ -+ es8316: es8316@11 { -+ compatible = "everest,es8316"; -+ reg = <0x11>; -+ clocks = <&cru SCLK_I2S_8CH_OUT>; -+ clock-names = "mclk"; -+ #sound-dai-cells = <0>; -+ }; -+}; -+ -+&i2c3 { -+ i2c-scl-falling-time-ns = <15>; -+ i2c-scl-rising-time-ns = <450>; -+ status = "okay"; -+}; -+ -+&i2c4 { -+ i2c-scl-falling-time-ns = <20>; -+ i2c-scl-rising-time-ns = <600>; -+ status = "okay"; -+ -+ fusb0: fusb30x@22 { -+ compatible = "fcs,fusb302"; -+ reg = <0x22>; -+ fcs,int_n = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&fusb0_int_gpio>; -+ vbus-supply = <&vbus_typec>; -+ -+ connector { -+ compatible = "usb-c-connector"; -+ data-role = "host"; -+ label = "USB-C"; -+ op-sink-microwatt = <1000000>; -+ power-role = "dual"; -+ sink-pdos = -+ ; -+ source-pdos = -+ ; -+ try-power-role = "sink"; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ -+ usbc_hs: endpoint { -+ remote-endpoint = -+ <&u2phy0_typec_hs>; -+ }; -+ }; -+ -+ port@1 { -+ reg = <1>; -+ -+ usbc_ss: endpoint { -+ remote-endpoint = -+ <&tcphy0_typec_ss>; -+ }; -+ }; -+ -+ port@2 { -+ reg = <2>; -+ -+ usbc_dp: endpoint { -+ remote-endpoint = -+ <&tcphy0_typec_dp>; -+ }; -+ }; -+ }; -+ }; -+ }; -+}; -+ -+&i2s1 { -+ #sound-dai-cells = <0>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2s_8ch_mclk_gpio>, <&i2s1_2ch_bus>; -+ rockchip,capture-channels = <8>; -+ rockchip,playback-channels = <8>; -+ status = "okay"; -+}; -+ -+&io_domains { -+ audio-supply = <&vcc_3v0>; -+ gpio1830-supply = <&vcc_3v0>; -+ sdmmc-supply = <&vcc_sdio>; -+ status = "okay"; -+}; -+ -+&pcie_phy { -+ status = "okay"; -+}; -+ -+&pcie0 { -+ bus-scan-delay-ms = <1000>; -+ ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; -+ max-link-speed = <2>; -+ num-lanes = <4>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pcie_clkreqn_cpm>; -+ vpcie0v9-supply = <&vcca0v9_s3>; -+ vpcie1v8-supply = <&vcca1v8_s3>; -+ vpcie3v3-supply = <&vcc3v3_ssd>; -+ status = "okay"; -+}; -+ -+&pinctrl { -+ buttons { -+ pwrbtn_gpio: pwrbtn-gpio { -+ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ -+ lidbtn_gpio: lidbtn-gpio { -+ rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ }; -+ -+ dc-charger { -+ dc_det_gpio: dc-det-gpio { -+ rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ }; -+ -+ es8316 { -+ hp_det_gpio: hp-det-gpio { -+ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ }; -+ -+ fusb302x { -+ fusb0_int_gpio: fusb0-int-gpio { -+ rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ }; -+ -+ i2s1 { -+ i2s_8ch_mclk_gpio: i2s-8ch-mclk-gpio { -+ rockchip,pins = <4 RK_PA0 1 &pcfg_pull_none>; -+ }; -+ }; -+ -+ lcd-panel { -+ lcdvcc_en_gpio: lcdvcc-en-gpio { -+ rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ panel_en_gpio: panel-en-gpio { -+ rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ lcd_panel_reset_gpio: lcd-panel-reset-gpio { -+ rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ }; -+ -+ leds { -+ pwrled_gpio: pwrled_gpio { -+ rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ slpled_gpio: slpled_gpio { -+ rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+ -+ pmic { -+ pmic_int_l_gpio: pmic-int-l-gpio { -+ rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ -+ vsel1_gpio: vsel1-gpio { -+ rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>; -+ }; -+ -+ vsel2_gpio: vsel2-gpio { -+ rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>; -+ }; -+ }; -+ -+ sdcard { -+ sdmmc0_pwr_h_gpio: sdmmc0-pwr-h-gpio { -+ rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ }; -+ -+ sdio-pwrseq { -+ wifi_enable_h_gpio: wifi-enable-h-gpio { -+ rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+ -+ usb-typec { -+ vcc5v0_typec0_en_gpio: vcc5v0-typec0-en-gpio { -+ rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ }; -+ -+ usb2 { -+ pwr_5v_gpio: pwr-5v-gpio { -+ rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ vcc5v0_host_en_gpio: vcc5v0-host-en-gpio { -+ rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+ -+ wireless-bluetooth { -+ bt_wake_gpio: bt-wake-gpio { -+ rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ bt_host_wake_gpio: bt-host-wake-gpio { -+ rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ bt_reset_gpio: bt-reset-gpio { -+ rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+}; -+ -+&pmu_io_domains { -+ pmu1830-supply = <&vcc_3v0>; -+ status = "okay"; -+}; -+ -+&pwm0 { -+ status = "okay"; -+}; -+ -+&pwm2 { -+ status = "okay"; -+}; -+ -+&saradc { -+ vref-supply = <&vcca1v8_s3>; -+ status = "okay"; -+}; -+ -+&sdmmc { -+ bus-width = <4>; -+ cap-mmc-highspeed; -+ cap-sd-highspeed; -+ cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; -+ disable-wp; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>; -+ sd-uhs-sdr104; -+ vmmc-supply = <&vcc3v0_sd>; -+ vqmmc-supply = <&vcc_sdio>; -+ status = "okay"; -+}; -+ -+&sdio0 { -+ bus-width = <4>; -+ cap-sd-highspeed; -+ cap-sdio-irq; -+ keep-power-in-suspend; -+ mmc-pwrseq = <&sdio_pwrseq>; -+ non-removable; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; -+ sd-uhs-sdr104; -+ status = "okay"; -+}; -+ -+&sdhci { -+ bus-width = <8>; -+ mmc-hs200-1_8v; -+ non-removable; -+ status = "okay"; -+}; -+ -+&spi1 { -+ max-freq = <10000000>; -+ status = "okay"; -+ -+ spiflash: flash@0 { -+ compatible = "jedec,spi-nor"; -+ reg = <0>; -+ m25p,fast-read; -+ spi-max-frequency = <10000000>; -+ }; -+}; -+ -+&tcphy0 { -+ status = "okay"; -+}; -+ -+&tcphy0_dp { -+ port { -+ tcphy0_typec_dp: endpoint { -+ remote-endpoint = <&usbc_dp>; -+ }; -+ }; -+}; -+ -+&tcphy0_usb3 { -+ port { -+ tcphy0_typec_ss: endpoint { -+ remote-endpoint = <&usbc_ss>; -+ }; -+ }; -+}; -+ -+&tcphy1 { -+ status = "okay"; -+}; -+ -+&tsadc { -+ /* tshut mode 0:CRU 1:GPIO */ -+ rockchip,hw-tshut-mode = <1>; -+ /* tshut polarity 0:LOW 1:HIGH */ -+ rockchip,hw-tshut-polarity = <1>; -+ status = "okay"; -+}; -+ -+&u2phy0 { -+ status = "okay"; -+ -+ u2phy0_otg: otg-port { -+ status = "okay"; -+ }; -+ -+ u2phy0_host: host-port { -+ phy-supply = <&vcc5v0_otg>; -+ status = "okay"; -+ }; -+ -+ port { -+ u2phy0_typec_hs: endpoint { -+ remote-endpoint = <&usbc_hs>; -+ }; -+ }; -+}; -+ -+&u2phy1 { -+ status = "okay"; -+ -+ u2phy1_otg: otg-port { -+ status = "okay"; -+ }; -+ -+ u2phy1_host: host-port { -+ phy-supply = <&vcc5v0_otg>; -+ status = "okay"; -+ }; -+}; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>; -+ uart-has-rtscts; -+ status = "okay"; -+ -+ bluetooth { -+ compatible = "brcm,bcm4345c5"; -+ clocks = <&rk808 1>; -+ clock-names = "lpo"; -+ device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>; -+ host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>; -+ max-speed = <1500000>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&bt_host_wake_gpio &bt_wake_gpio &bt_reset_gpio>; -+ shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>; -+ vbat-supply = <&wifi_bat>; -+ vddio-supply = <&vcc_wl>; -+ }; -+}; -+ -+&uart2 { -+ status = "okay"; -+}; -+ -+&usb_host0_ehci { -+ status = "okay"; -+}; -+ -+&usb_host0_ohci { -+ status = "okay"; -+}; -+ -+&usb_host1_ehci { -+ status = "okay"; -+}; -+ -+&usb_host1_ohci { -+ status = "okay"; -+}; -+ -+&usbdrd3_0 { -+ status = "okay"; -+}; -+ -+&usbdrd_dwc3_0 { -+ dr_mode = "host"; -+ status = "okay"; -+}; -+ -+&usbdrd3_1 { -+ status = "okay"; -+}; -+ -+&usbdrd_dwc3_1 { -+ dr_mode = "host"; -+ status = "okay"; -+}; -+ -+&vopb { -+ status = "okay"; -+}; -+ -+&vopb_mmu { -+ status = "okay"; -+}; -+ -+&vopl { -+ status = "okay"; -+}; -+ -+&vopl_mmu { -+ status = "okay"; -+}; --- -2.20.1 - diff --git a/gnu/packages/patches/u-boot-add-boe-nv140fhmn49-display.patch b/gnu/packages/patches/u-boot-add-boe-nv140fhmn49-display.patch deleted file mode 100644 index c359522967..0000000000 --- a/gnu/packages/patches/u-boot-add-boe-nv140fhmn49-display.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 00978950fed39b6104b6b4f141450a66cc3400fa Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Mon, 20 Apr 2020 20:27:32 +0100 -Origin: https://patchwork.ozlabs.org/project/uboot/patch/20200420192736.962307-2-pbrobinson@gmail.com/ -Subject: [PATCH 1/5] video: simple_panel: add boe,nv140fhmn49 display - -add "boe,nv140fhmn49" display to compatible node. - -Signed-off-by: Peter Robinson -Cc: Anatolij Gustschin ---- - drivers/video/simple_panel.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/video/simple_panel.c b/drivers/video/simple_panel.c -index c3c0e84732..5722811117 100644 ---- a/drivers/video/simple_panel.c -+++ b/drivers/video/simple_panel.c -@@ -105,6 +105,7 @@ static const struct udevice_id simple_panel_ids[] = { - { .compatible = "auo,b133xtn01" }, - { .compatible = "auo,b116xw03" }, - { .compatible = "auo,b133htn01" }, -+ { .compatible = "boe,nv140fhmn49" }, - { .compatible = "lg,lb070wv8" }, - { } - }; --- -2.20.1 - diff --git a/gnu/packages/patches/u-boot-gpio-keys-binding-cons.patch b/gnu/packages/patches/u-boot-gpio-keys-binding-cons.patch deleted file mode 100644 index aec33a7023..0000000000 --- a/gnu/packages/patches/u-boot-gpio-keys-binding-cons.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 451bd72bf966df7518682cb748a804634ea19424 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Mon, 20 Apr 2020 20:27:33 +0100 -Origin: https://patchwork.ozlabs.org/project/uboot/patch/20200420192736.962307-3-pbrobinson@gmail.com/ -Subject: [PATCH 2/5] dt-bindings: input: adopt Linux gpio-keys binding - constants - -Sync the gpio-keys input bindings from linux 5.7-rc1. - -Signed-off-by: Peter Robinson ---- - include/dt-bindings/input/gpio-keys.h | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - create mode 100644 include/dt-bindings/input/gpio-keys.h - -diff --git a/include/dt-bindings/input/gpio-keys.h b/include/dt-bindings/input/gpio-keys.h -new file mode 100644 -index 0000000000..8962df79e7 ---- /dev/null -+++ b/include/dt-bindings/input/gpio-keys.h -@@ -0,0 +1,13 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * This header provides constants for gpio keys bindings. -+ */ -+ -+#ifndef _DT_BINDINGS_GPIO_KEYS_H -+#define _DT_BINDINGS_GPIO_KEYS_H -+ -+#define EV_ACT_ANY 0x00 /* asserted or deasserted */ -+#define EV_ACT_ASSERTED 0x01 /* asserted */ -+#define EV_ACT_DEASSERTED 0x02 /* deasserted */ -+ -+#endif /* _DT_BINDINGS_GPIO_KEYS_H */ --- -2.20.1 - diff --git a/gnu/packages/patches/u-boot-leds-common-binding-con.patch b/gnu/packages/patches/u-boot-leds-common-binding-con.patch deleted file mode 100644 index 837408120b..0000000000 --- a/gnu/packages/patches/u-boot-leds-common-binding-con.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 282b6ca04abbe1302d04caa05be5fc5afb127141 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Mon, 20 Apr 2020 20:27:34 +0100 -Origin: https://patchwork.ozlabs.org/project/uboot/patch/20200420192736.962307-4-pbrobinson@gmail.com/ -Subject: [PATCH 3/5] dt-bindings: leds: adopt Linux leds common binding - constants - -Sync the common leds bindings from linux 5.7-rc1. - -Signed-off-by: Peter Robinson ---- - include/dt-bindings/leds/common.h | 91 +++++++++++++++++++++++++++++++ - 1 file changed, 91 insertions(+) - create mode 100644 include/dt-bindings/leds/common.h - -diff --git a/include/dt-bindings/leds/common.h b/include/dt-bindings/leds/common.h -new file mode 100644 -index 0000000000..0ce7dfc00d ---- /dev/null -+++ b/include/dt-bindings/leds/common.h -@@ -0,0 +1,91 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * This header provides macros for the common LEDs device tree bindings. -+ * -+ * Copyright (C) 2015, Samsung Electronics Co., Ltd. -+ * Author: Jacek Anaszewski -+ * -+ * Copyright (C) 2019 Jacek Anaszewski -+ * Copyright (C) 2020 Pavel Machek -+ */ -+ -+#ifndef __DT_BINDINGS_LEDS_H -+#define __DT_BINDINGS_LEDS_H -+ -+/* External trigger type */ -+#define LEDS_TRIG_TYPE_EDGE 0 -+#define LEDS_TRIG_TYPE_LEVEL 1 -+ -+/* Boost modes */ -+#define LEDS_BOOST_OFF 0 -+#define LEDS_BOOST_ADAPTIVE 1 -+#define LEDS_BOOST_FIXED 2 -+ -+/* Standard LED colors */ -+#define LED_COLOR_ID_WHITE 0 -+#define LED_COLOR_ID_RED 1 -+#define LED_COLOR_ID_GREEN 2 -+#define LED_COLOR_ID_BLUE 3 -+#define LED_COLOR_ID_AMBER 4 -+#define LED_COLOR_ID_VIOLET 5 -+#define LED_COLOR_ID_YELLOW 6 -+#define LED_COLOR_ID_IR 7 -+#define LED_COLOR_ID_MAX 8 -+ -+/* Standard LED functions */ -+/* Keyboard LEDs, usually it would be input4::capslock etc. */ -+/* Obsolete equivalent: "shift-key-light" */ -+#define LED_FUNCTION_CAPSLOCK "capslock" -+#define LED_FUNCTION_SCROLLLOCK "scrolllock" -+#define LED_FUNCTION_NUMLOCK "numlock" -+/* Obsolete equivalents: "tpacpi::thinklight" (IBM/Lenovo Thinkpads), -+ "lp5523:kb{1,2,3,4,5,6}" (Nokia N900) */ -+#define LED_FUNCTION_KBD_BACKLIGHT "kbd_backlight" -+ -+/* System LEDs, usually found on system body. -+ platform::mute (etc) is sometimes seen, :mute would be better */ -+#define LED_FUNCTION_POWER "power" -+#define LED_FUNCTION_DISK "disk" -+ -+/* Obsolete: "platform:*:charging" (allwinner sun50i) */ -+#define LED_FUNCTION_CHARGING "charging" -+/* Used RGB notification LEDs common on phones. -+ Obsolete equivalents: "status-led:{red,green,blue}" (Motorola Droid 4), -+ "lp5523:{r,g,b}" (Nokia N900) */ -+#define LED_FUNCTION_STATUS "status" -+ -+#define LED_FUNCTION_MICMUTE "micmute" -+#define LED_FUNCTION_MUTE "mute" -+ -+/* Miscelleaus functions. Use functions above if you can. */ -+#define LED_FUNCTION_ACTIVITY "activity" -+#define LED_FUNCTION_ALARM "alarm" -+#define LED_FUNCTION_BACKLIGHT "backlight" -+#define LED_FUNCTION_BLUETOOTH "bluetooth" -+#define LED_FUNCTION_BOOT "boot" -+#define LED_FUNCTION_CPU "cpu" -+#define LED_FUNCTION_DEBUG "debug" -+#define LED_FUNCTION_DISK_ACTIVITY "disk-activity" -+#define LED_FUNCTION_DISK_ERR "disk-err" -+#define LED_FUNCTION_DISK_READ "disk-read" -+#define LED_FUNCTION_DISK_WRITE "disk-write" -+#define LED_FUNCTION_FAULT "fault" -+#define LED_FUNCTION_FLASH "flash" -+#define LED_FUNCTION_HEARTBEAT "heartbeat" -+#define LED_FUNCTION_INDICATOR "indicator" -+#define LED_FUNCTION_LAN "lan" -+#define LED_FUNCTION_MAIL "mail" -+#define LED_FUNCTION_MTD "mtd" -+#define LED_FUNCTION_PANIC "panic" -+#define LED_FUNCTION_PROGRAMMING "programming" -+#define LED_FUNCTION_RX "rx" -+#define LED_FUNCTION_SD "sd" -+#define LED_FUNCTION_STANDBY "standby" -+#define LED_FUNCTION_TORCH "torch" -+#define LED_FUNCTION_TX "tx" -+#define LED_FUNCTION_USB "usb" -+#define LED_FUNCTION_WAN "wan" -+#define LED_FUNCTION_WLAN "wlan" -+#define LED_FUNCTION_WPS "wps" -+ -+#endif /* __DT_BINDINGS_LEDS_H */ --- -2.20.1 - diff --git a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch index 3feeb1dc5e..29dec4f5e9 100644 --- a/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch +++ b/gnu/packages/patches/u-boot-riscv64-fix-extlinux.patch @@ -16,7 +16,6 @@ Signed-off-by: David Abdurachmanov --- configs/qemu-riscv64_smode_defconfig | 2 ++ configs/sifive_fu540_defconfig | 2 ++ - include/configs/sifive-fu540.h | 4 ---- 3 files changed, 4 insertions(+), 4 deletions(-) Index: u-boot/configs/qemu-riscv64_smode_defconfig @@ -39,16 +38,3 @@ Index: u-boot/configs/sifive_fu540_defconfig CONFIG_DM_MTD=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};" -Index: u-boot/include/configs/sifive-fu540.h -=================================================================== ---- u-boot.orig/include/configs/sifive-fu540.h -+++ u-boot/include/configs/sifive-fu540.h -@@ -40,8 +40,4 @@ - "ramdisk_addr_r=0x88300000\0" \ - BOOTENV - --#define CONFIG_PREBOOT \ -- "setenv fdt_addr ${fdtcontroladdr};" \ -- "fdt addr ${fdtcontroladdr};" -- - #endif /* __CONFIG_H */ diff --git a/gnu/packages/patches/u-boot-support-Pinebook-Pro-laptop.patch b/gnu/packages/patches/u-boot-support-Pinebook-Pro-laptop.patch deleted file mode 100644 index c6f91fa65a..0000000000 --- a/gnu/packages/patches/u-boot-support-Pinebook-Pro-laptop.patch +++ /dev/null @@ -1,367 +0,0 @@ -From 60381e4add64dddbd07e78248b2b0f819eb2776e Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Mon, 20 Apr 2020 20:27:36 +0100 -Origin: https://patchwork.ozlabs.org/project/uboot/patch/20200420192736.962307-6-pbrobinson@gmail.com/ -Subject: [PATCH 5/5] Add initial support for the Pinebook Pro laptop from - Pine64. - -Specification: -- Rockchip RK3399 -- 4GB Dual-Channel LPDDR4 -- eMMC socket -- mSD card slot -- 128Mbit (16Mb) SPI Flash -- AP6256 for 11AC WiFi + BT5 -- 14 inch 1920*1080 eDP MiPi display -- Camera -- USB 3.0, 2.0 ports -- Type-C port with alt-mode display (DP 1.2) and 15W charge -- DC 5V/3A -- optional PCIe slot for NVMe SSD drive - -Signed-off-by: Peter Robinson ---- - arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi | 43 ++++++++++ - arch/arm/mach-rockchip/rk3399/Kconfig | 8 ++ - board/pine64/pinebook-pro-rk3399/Kconfig | 15 ++++ - board/pine64/pinebook-pro-rk3399/MAINTAINERS | 8 ++ - board/pine64/pinebook-pro-rk3399/Makefile | 1 + - .../pinebook-pro-rk3399/pinebook-pro-rk3399.c | 76 +++++++++++++++++ - configs/pinebook-pro-rk3399_defconfig | 84 +++++++++++++++++++ - include/configs/pinebook-pro-rk3399.h | 29 +++++++ - 8 files changed, 264 insertions(+) - create mode 100644 arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi - create mode 100644 board/pine64/pinebook-pro-rk3399/Kconfig - create mode 100644 board/pine64/pinebook-pro-rk3399/MAINTAINERS - create mode 100644 board/pine64/pinebook-pro-rk3399/Makefile - create mode 100644 board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c - create mode 100644 configs/pinebook-pro-rk3399_defconfig - create mode 100644 include/configs/pinebook-pro-rk3399.h - -diff --git a/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi -new file mode 100644 -index 0000000000..1a2e24d3ef ---- /dev/null -+++ b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi -@@ -0,0 +1,43 @@ -+// SPDX-License-Identifier: GPL-2.0+ -+/* -+ * Copyright (C) 2019 Peter Robinson -+ */ -+ -+#include "rk3399-u-boot.dtsi" -+#include "rk3399-sdram-lpddr4-100.dtsi" -+ -+/ { -+ aliases { -+ spi0 = &spi1; -+ }; -+ -+ chosen { -+ u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc; -+ }; -+}; -+ -+&i2c0 { -+ u-boot,dm-pre-reloc; -+}; -+ -+&rk808 { -+ u-boot,dm-pre-reloc; -+}; -+ -+&sdhci { -+ max-frequency = <25000000>; -+ u-boot,dm-pre-reloc; -+}; -+ -+&sdmmc { -+ max-frequency = <20000000>; -+ u-boot,dm-pre-reloc; -+}; -+ -+&spiflash { -+ u-boot,dm-pre-reloc; -+}; -+ -+&vdd_log { -+ regulator-init-microvolt = <950000>; -+}; -diff --git a/arch/arm/mach-rockchip/rk3399/Kconfig b/arch/arm/mach-rockchip/rk3399/Kconfig -index 927bb62a9f..254b9c5b4d 100644 ---- a/arch/arm/mach-rockchip/rk3399/Kconfig -+++ b/arch/arm/mach-rockchip/rk3399/Kconfig -@@ -19,6 +19,13 @@ config TARGET_EVB_RK3399 - with full function and physical connectors support like Type-C ports, - USB.0 host ports, LVDS, JTAG, MAC, SD card, HDMI, USB-to-serial... - -+config TARGET_PINEBOOK_PRO_RK3399 -+ bool "Pinebook Pro" -+ help -+ Pinebook Pro is a laptop based on the Rockchip rk3399 SoC -+ with 4Gb RAM, onboard eMMC, USB-C, a USB3 and USB2 port, -+ 1920*1080 screen and all the usual laptop features. -+ - config TARGET_PUMA_RK3399 - bool "Theobroma Systems RK3399-Q7 (Puma)" - help -@@ -144,6 +151,7 @@ endif # BOOTCOUNT_LIMIT - - source "board/firefly/roc-pc-rk3399/Kconfig" - source "board/google/gru/Kconfig" -+source "board/pine64/pinebook-pro-rk3399/Kconfig" - source "board/pine64/rockpro64_rk3399/Kconfig" - source "board/rockchip/evb_rk3399/Kconfig" - source "board/theobroma-systems/puma_rk3399/Kconfig" -diff --git a/board/pine64/pinebook-pro-rk3399/Kconfig b/board/pine64/pinebook-pro-rk3399/Kconfig -new file mode 100644 -index 0000000000..3bb7ca448e ---- /dev/null -+++ b/board/pine64/pinebook-pro-rk3399/Kconfig -@@ -0,0 +1,15 @@ -+if TARGET_PINEBOOK_PRO_RK3399 -+ -+config SYS_BOARD -+ default "pinebook-pro-rk3399" -+ -+config SYS_VENDOR -+ default "pine64" -+ -+config SYS_CONFIG_NAME -+ default "pinebook-pro-rk3399" -+ -+config BOARD_SPECIFIC_OPTIONS -+ def_bool y -+ -+endif -diff --git a/board/pine64/pinebook-pro-rk3399/MAINTAINERS b/board/pine64/pinebook-pro-rk3399/MAINTAINERS -new file mode 100644 -index 0000000000..7153eaf2e0 ---- /dev/null -+++ b/board/pine64/pinebook-pro-rk3399/MAINTAINERS -@@ -0,0 +1,8 @@ -+PINEBOOK_PRO -+M: Peter Robinson -+S: Maintained -+F: board/pine64/rk3399-pinebook-pro/ -+F: include/configs/rk3399-pinebook-pro.h -+F: arch/arm/dts/rk3399-pinebook-pro.dts -+F: arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi -+F: configs/pinebook-pro-rk3399_defconfig -diff --git a/board/pine64/pinebook-pro-rk3399/Makefile b/board/pine64/pinebook-pro-rk3399/Makefile -new file mode 100644 -index 0000000000..2f692a12a6 ---- /dev/null -+++ b/board/pine64/pinebook-pro-rk3399/Makefile -@@ -0,0 +1 @@ -+obj-y += pinebook-pro-rk3399.o -diff --git a/board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c b/board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c -new file mode 100644 -index 0000000000..01421cbac2 ---- /dev/null -+++ b/board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c -@@ -0,0 +1,76 @@ -+/* -+ * (C) Copyright 2016 Rockchip Electronics Co., Ltd -+ * (C) Copyright 2020 Peter Robinson -+ * -+ * SPDX-License-Identifier: GPL-2.0+ -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define GRF_IO_VSEL_BT565_SHIFT 0 -+#define PMUGRF_CON0_VSEL_SHIFT 8 -+ -+#ifndef CONFIG_SPL_BUILD -+int board_early_init_f(void) -+{ -+ struct udevice *regulator; -+ int ret; -+ -+ ret = regulator_get_by_platname("vcc5v0_usb", ®ulator); -+ if (ret) { -+ debug("%s vcc5v0_usb init fail! ret %d\n", __func__, ret); -+ goto out; -+ } -+ -+ ret = regulator_set_enable(regulator, true); -+ if (ret) -+ debug("%s vcc5v0-host-en-gpio set fail! ret %d\n", __func__, ret); -+ -+out: -+ return 0; -+} -+#endif -+ -+#ifdef CONFIG_MISC_INIT_R -+static void setup_iodomain(void) -+{ -+ struct rk3399_grf_regs *grf = -+ syscon_get_first_range(ROCKCHIP_SYSCON_GRF); -+ struct rk3399_pmugrf_regs *pmugrf = -+ syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF); -+ -+ /* BT565 is in 1.8v domain */ -+ rk_setreg(&grf->io_vsel, 1 << GRF_IO_VSEL_BT565_SHIFT); -+ -+ /* Set GPIO1 1.8v/3.0v source select to PMU1830_VOL */ -+ rk_setreg(&pmugrf->soc_con0, 1 << PMUGRF_CON0_VSEL_SHIFT); -+} -+ -+int misc_init_r(void) -+{ -+ const u32 cpuid_offset = 0x7; -+ const u32 cpuid_length = 0x10; -+ u8 cpuid[cpuid_length]; -+ int ret; -+ -+ setup_iodomain(); -+ -+ ret = rockchip_cpuid_from_efuse(cpuid_offset, cpuid_length, cpuid); -+ if (ret) -+ return ret; -+ -+ ret = rockchip_cpuid_set(cpuid, cpuid_length); -+ if (ret) -+ return ret; -+ -+ return ret; -+} -+#endif -diff --git a/configs/pinebook-pro-rk3399_defconfig b/configs/pinebook-pro-rk3399_defconfig -new file mode 100644 -index 0000000000..0e9f0ec250 ---- /dev/null -+++ b/configs/pinebook-pro-rk3399_defconfig -@@ -0,0 +1,84 @@ -+CONFIG_ARM=y -+CONFIG_ARCH_ROCKCHIP=y -+CONFIG_SYS_TEXT_BASE=0x00200000 -+CONFIG_ENV_OFFSET=0x3F8000 -+CONFIG_ROCKCHIP_RK3399=y -+CONFIG_RAM_RK3399_LPDDR4=y -+CONFIG_NR_DRAM_BANKS=1 -+CONFIG_TARGET_PINEBOOK_PRO_RK3399=y -+CONFIG_BAUDRATE=1500000 -+CONFIG_DEBUG_UART=y -+CONFIG_DEBUG_UART_SHIFT=2 -+CONFIG_DEBUG_UART_BASE=0xFF1A0000 -+CONFIG_DEBUG_UART_CLOCK=24000000 -+CONFIG_SPL_SPI_SUPPORT=y -+CONFIG_SPL_SPI_FLASH_SUPPORT=y -+CONFIG_SPL_MTD_SUPPORT=y -+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-pinebook-pro.dtb" -+CONFIG_MISC_INIT_R=y -+CONFIG_DISPLAY_BOARDINFO_LATE=y -+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set -+CONFIG_SPL_STACK_R=y -+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000 -+CONFIG_TPL=y -+CONFIG_SPL_OF_CONTROL=y -+CONFIG_DEFAULT_DEVICE_TREE="rk3399-pinebook-pro" -+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" -+CONFIG_SYS_RELOC_GD_ENV_ADDR=y -+CONFIG_CMD_BOOTZ=y -+CONFIG_CMD_GPIO=y -+CONFIG_CMD_GPT=y -+CONFIG_CMD_I2C=y -+CONFIG_CMD_MMC=y -+CONFIG_CMD_MTDPARTS=y -+CONFIG_CMD_PMIC=y -+CONFIG_CMD_REGULATOR=y -+# CONFIG_CMD_SETEXPR is not set -+CONFIG_CMD_SF=y -+CONFIG_CMD_TIME=y -+CONFIG_CMD_USB=y -+CONFIG_ROCKCHIP_GPIO=y -+CONFIG_SYS_I2C_ROCKCHIP=y -+CONFIG_BOOTDELAY=3 -+CONFIG_LED=y -+CONFIG_LED_GPIO=y -+CONFIG_MISC=y -+CONFIG_ROCKCHIP_EFUSE=y -+CONFIG_MMC_DW=y -+CONFIG_MMC_DW_ROCKCHIP=y -+CONFIG_MMC_SDHCI=y -+CONFIG_MMC_SDHCI_SDMA=y -+CONFIG_MMC_SDHCI_ROCKCHIP=y -+CONFIG_ROCKCHIP_SPI=y -+CONFIG_SF_DEFAULT_SPEED=20000000 -+CONFIG_SPI_FLASH=y -+CONFIG_SPI_FLASH_GIGADEVICE=y -+CONFIG_SPI_FLASH_WINBOND=y -+CONFIG_DM_ETH=y -+CONFIG_PMIC_RK8XX=y -+CONFIG_DM_PMIC_FAN53555=y -+CONFIG_REGULATOR_PWM=y -+CONFIG_REGULATOR_RK8XX=y -+CONFIG_PWM_ROCKCHIP=y -+CONFIG_SYSRESET=y -+CONFIG_USB=y -+CONFIG_USB_XHCI_HCD=y -+CONFIG_USB_XHCI_DWC3=y -+# CONFIG_USB_XHCI_ROCKCHIP is not set -+CONFIG_USB_EHCI_HCD=y -+CONFIG_USB_EHCI_GENERIC=y -+CONFIG_USB_DWC3=y -+CONFIG_ROCKCHIP_USB2_PHY=y -+CONFIG_USB_HOST_ETHER=y -+CONFIG_USB_ETHER_ASIX=y -+CONFIG_USB_ETHER_RTL8152=y -+CONFIG_USB_KEYBOARD=y -+CONFIG_USE_TINY_PRINTF=y -+CONFIG_SPL_TINY_MEMSET=y -+CONFIG_ERRNO_STR=y -+CONFIG_DM_VIDEO=y -+CONFIG_VIDEO_BPP16=y -+CONFIG_VIDEO_BPP32=y -+CONFIG_DISPLAY=y -+CONFIG_VIDEO_ROCKCHIP=y -+CONFIG_DISPLAY_ROCKCHIP_EDP=y -diff --git a/include/configs/pinebook-pro-rk3399.h b/include/configs/pinebook-pro-rk3399.h -new file mode 100644 -index 0000000000..423d742a79 ---- /dev/null -+++ b/include/configs/pinebook-pro-rk3399.h -@@ -0,0 +1,29 @@ -+/* -+ * Copyright (C) 2016 Rockchip Electronics Co., Ltd -+ * Copyright (C) 2020 Peter Robinson -+ * -+ * SPDX-License-Identifier: GPL-2.0+ -+ */ -+ -+#ifndef __PINEBOOK_PRO_RK3399_H -+#define __PINEBOOK_PRO_RK3399_H -+ -+#define ROCKCHIP_DEVICE_SETTINGS \ -+ "stdin=serial,usbkbd\0" \ -+ "stdout=serial,vidconsole\0" \ -+ "stderr=serial,vidconsole\0" -+ -+#include -+ -+#if defined(CONFIG_ENV_IS_IN_MMC) -+#define CONFIG_SYS_MMC_ENV_DEV 0 -+#elif defined(CONFIG_ENV_IS_IN_SPI_FLASH) -+#define CONFIG_ENV_SECT_SIZE (8 * 1024) -+#endif -+ -+#undef CONFIG_SYS_SPI_U_BOOT_OFFS -+#define CONFIG_SYS_SPI_U_BOOT_OFFS 1024 * 512 -+ -+#define SDRAM_BANK_SIZE (2UL << 30) -+ -+#endif --- -2.20.1 - diff --git a/gnu/packages/patches/u-boot-video-rockchip-fix-build.patch b/gnu/packages/patches/u-boot-video-rockchip-fix-build.patch deleted file mode 100644 index ca2be8dc22..0000000000 --- a/gnu/packages/patches/u-boot-video-rockchip-fix-build.patch +++ /dev/null @@ -1,48 +0,0 @@ -From ecc69ec25df07e1ce63d7add6b235b37673ed608 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Mon, 20 Apr 2020 19:18:25 +0100 -Origin: https://patchwork.ozlabs.org/project/uboot/patch/20200420181825.935797-1-pbrobinson@gmail.com/ -Subject: [PATCH 6/6] drivers: video: rockchip: fix building eDP and LVDS - drivers - -The rk_edp.c and rk_lvds.c files reference rk_setreg which is declared in -hardware.h so include it so the drivers build. Adjust rk_lvds.c so -includes are in alphabetical order while updating. - -Signed-off-by: Peter Robinson -Reviewed-by: Anatolij Gustschin ---- - drivers/video/rockchip/rk_edp.c | 1 + - drivers/video/rockchip/rk_lvds.c | 3 ++- - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/drivers/video/rockchip/rk_edp.c b/drivers/video/rockchip/rk_edp.c -index 8703df0ec0..cf84b886e7 100644 ---- a/drivers/video/rockchip/rk_edp.c -+++ b/drivers/video/rockchip/rk_edp.c -@@ -18,6 +18,7 @@ - #include - #include - #include -+#include - #include - - #define MAX_CR_LOOP 5 -diff --git a/drivers/video/rockchip/rk_lvds.c b/drivers/video/rockchip/rk_lvds.c -index cf5c0439b1..79e24baf53 100644 ---- a/drivers/video/rockchip/rk_lvds.c -+++ b/drivers/video/rockchip/rk_lvds.c -@@ -13,8 +13,9 @@ - #include - #include - #include --#include - #include -+#include -+#include - #include - #include - --- -2.20.1 - -- cgit v1.2.3 From 3f4f0770512b286523a398e3f9f3eb6441f44b17 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Fri, 10 Jul 2020 00:15:42 -0400 Subject: gnu: linux-libre: Fix regression with Atheros 9271. * gnu/packages/patches/linux-libre-fix-atheros-9271.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/linux.scm (%linux-libre-fix-atheros-9271-patch): New variable. (linux-libre-4.4-source, linux-libre-4.9-source) (linux-libre-4.14-source, linux-libre-4.19-source) (linux-libre-5.4-source, linux-libre-5.7-source): Add the patch. --- .../patches/linux-libre-fix-atheros-9271.patch | 225 +++++++++++++++++++++ 1 file changed, 225 insertions(+) create mode 100644 gnu/packages/patches/linux-libre-fix-atheros-9271.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/linux-libre-fix-atheros-9271.patch b/gnu/packages/patches/linux-libre-fix-atheros-9271.patch new file mode 100644 index 0000000000..7527f9fdf0 --- /dev/null +++ b/gnu/packages/patches/linux-libre-fix-atheros-9271.patch @@ -0,0 +1,225 @@ +Revert the following upstream commit, which broke Atheros 9271 support. +See: + https://bugzilla.kernel.org/show_bug.cgi?id=208251 + https://bugzilla.redhat.com/show_bug.cgi?id=1848631 + + +From b5c8896bc14f54e5c4dd5a6e42879f125b8abd2d Mon Sep 17 00:00:00 2001 +From: Qiujun Huang +Date: Sat, 4 Apr 2020 12:18:38 +0800 +Subject: ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb + +commit 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 upstream. + +In ath9k_hif_usb_rx_cb interface number is assumed to be 0. +usb_ifnum_to_if(urb->dev, 0) +But it isn't always true. + +The case reported by syzbot: +https://lore.kernel.org/linux-usb/000000000000666c9c05a1c05d12@google.com +usb 2-1: new high-speed USB device number 2 using dummy_hcd +usb 2-1: config 1 has an invalid interface number: 2 but max is 0 +usb 2-1: config 1 has no interface number 0 +usb 2-1: New USB device found, idVendor=0cf3, idProduct=9271, bcdDevice= +1.08 +usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 +general protection fault, probably for non-canonical address +0xdffffc0000000015: 0000 [#1] SMP KASAN +KASAN: null-ptr-deref in range [0x00000000000000a8-0x00000000000000af] +CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.6.0-rc5-syzkaller #0 + +Call Trace +__usb_hcd_giveback_urb+0x29a/0x550 drivers/usb/core/hcd.c:1650 +usb_hcd_giveback_urb+0x368/0x420 drivers/usb/core/hcd.c:1716 +dummy_timer+0x1258/0x32ae drivers/usb/gadget/udc/dummy_hcd.c:1966 +call_timer_fn+0x195/0x6f0 kernel/time/timer.c:1404 +expire_timers kernel/time/timer.c:1449 [inline] +__run_timers kernel/time/timer.c:1773 [inline] +__run_timers kernel/time/timer.c:1740 [inline] +run_timer_softirq+0x5f9/0x1500 kernel/time/timer.c:1786 +__do_softirq+0x21e/0x950 kernel/softirq.c:292 +invoke_softirq kernel/softirq.c:373 [inline] +irq_exit+0x178/0x1a0 kernel/softirq.c:413 +exiting_irq arch/x86/include/asm/apic.h:546 [inline] +smp_apic_timer_interrupt+0x141/0x540 arch/x86/kernel/apic/apic.c:1146 +apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 + +Reported-and-tested-by: syzbot+40d5d2e8a4680952f042@syzkaller.appspotmail.com +Signed-off-by: Qiujun Huang +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20200404041838.10426-6-hqjagain@gmail.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/wireless/ath/ath9k/hif_usb.c | 48 ++++++++++++++++++++++++-------- + drivers/net/wireless/ath/ath9k/hif_usb.h | 5 ++++ + 2 files changed, 42 insertions(+), 11 deletions(-) + +diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c +index 6049d3766c64..4ed21dad6a8e 100644 +--- b/drivers/net/wireless/ath/ath9k/hif_usb.c ++++ a/drivers/net/wireless/ath/ath9k/hif_usb.c +@@ -643,9 +643,9 @@ + + static void ath9k_hif_usb_rx_cb(struct urb *urb) + { +- struct rx_buf *rx_buf = (struct rx_buf *)urb->context; +- struct hif_device_usb *hif_dev = rx_buf->hif_dev; +- struct sk_buff *skb = rx_buf->skb; ++ struct sk_buff *skb = (struct sk_buff *) urb->context; ++ struct hif_device_usb *hif_dev = ++ usb_get_intfdata(usb_ifnum_to_if(urb->dev, 0)); + int ret; + + if (!skb) +@@ -685,15 +685,14 @@ + return; + free: + kfree_skb(skb); +- kfree(rx_buf); + } + + static void ath9k_hif_usb_reg_in_cb(struct urb *urb) + { +- struct rx_buf *rx_buf = (struct rx_buf *)urb->context; +- struct hif_device_usb *hif_dev = rx_buf->hif_dev; +- struct sk_buff *skb = rx_buf->skb; ++ struct sk_buff *skb = (struct sk_buff *) urb->context; + struct sk_buff *nskb; ++ struct hif_device_usb *hif_dev = ++ usb_get_intfdata(usb_ifnum_to_if(urb->dev, 0)); + int ret; + + if (!skb) +@@ -751,7 +750,6 @@ + return; + free: + kfree_skb(skb); +- kfree(rx_buf); + urb->context = NULL; + } + +@@ -797,7 +795,7 @@ + init_usb_anchor(&hif_dev->mgmt_submitted); + + for (i = 0; i < MAX_TX_URB_NUM; i++) { +- tx_buf = kzalloc(sizeof(*tx_buf), GFP_KERNEL); ++ tx_buf = kzalloc(sizeof(struct tx_buf), GFP_KERNEL); + if (!tx_buf) + goto err; + +@@ -834,9 +832,8 @@ + + static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev) + { +- struct rx_buf *rx_buf = NULL; ++ struct urb *urb = NULL; + struct sk_buff *skb = NULL; +- struct urb *urb = NULL; + int i, ret; + + init_usb_anchor(&hif_dev->rx_submitted); +@@ -844,12 +841,6 @@ + + for (i = 0; i < MAX_RX_URB_NUM; i++) { + +- rx_buf = kzalloc(sizeof(*rx_buf), GFP_KERNEL); +- if (!rx_buf) { +- ret = -ENOMEM; +- goto err_rxb; +- } +- + /* Allocate URB */ + urb = usb_alloc_urb(0, GFP_KERNEL); + if (urb == NULL) { +@@ -864,14 +855,11 @@ + goto err_skb; + } + +- rx_buf->hif_dev = hif_dev; +- rx_buf->skb = skb; +- + usb_fill_bulk_urb(urb, hif_dev->udev, + usb_rcvbulkpipe(hif_dev->udev, + USB_WLAN_RX_PIPE), + skb->data, MAX_RX_BUF_SIZE, +- ath9k_hif_usb_rx_cb, rx_buf); ++ ath9k_hif_usb_rx_cb, skb); + + /* Anchor URB */ + usb_anchor_urb(urb, &hif_dev->rx_submitted); +@@ -897,8 +885,6 @@ + err_skb: + usb_free_urb(urb); + err_urb: +- kfree(rx_buf); +-err_rxb: + ath9k_hif_usb_dealloc_rx_urbs(hif_dev); + return ret; + } +@@ -910,21 +896,14 @@ + + static int ath9k_hif_usb_alloc_reg_in_urbs(struct hif_device_usb *hif_dev) + { +- struct rx_buf *rx_buf = NULL; ++ struct urb *urb = NULL; + struct sk_buff *skb = NULL; +- struct urb *urb = NULL; + int i, ret; + + init_usb_anchor(&hif_dev->reg_in_submitted); + + for (i = 0; i < MAX_REG_IN_URB_NUM; i++) { + +- rx_buf = kzalloc(sizeof(*rx_buf), GFP_KERNEL); +- if (!rx_buf) { +- ret = -ENOMEM; +- goto err_rxb; +- } +- + /* Allocate URB */ + urb = usb_alloc_urb(0, GFP_KERNEL); + if (urb == NULL) { +@@ -939,14 +918,11 @@ + goto err_skb; + } + +- rx_buf->hif_dev = hif_dev; +- rx_buf->skb = skb; +- + usb_fill_int_urb(urb, hif_dev->udev, + usb_rcvintpipe(hif_dev->udev, + USB_REG_IN_PIPE), + skb->data, MAX_REG_IN_BUF_SIZE, +- ath9k_hif_usb_reg_in_cb, rx_buf, 1); ++ ath9k_hif_usb_reg_in_cb, skb, 1); + + /* Anchor URB */ + usb_anchor_urb(urb, &hif_dev->reg_in_submitted); +@@ -972,8 +948,6 @@ + err_skb: + usb_free_urb(urb); + err_urb: +- kfree(rx_buf); +-err_rxb: + ath9k_hif_usb_dealloc_reg_in_urbs(hif_dev); + return ret; + } +diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.h b/drivers/net/wireless/ath/ath9k/hif_usb.h +index a94e7e1c86e9..5985aa15ca93 100644 +--- b/drivers/net/wireless/ath/ath9k/hif_usb.h ++++ a/drivers/net/wireless/ath/ath9k/hif_usb.h +@@ -86,11 +86,6 @@ + struct list_head list; + }; + +-struct rx_buf { +- struct sk_buff *skb; +- struct hif_device_usb *hif_dev; +-}; +- + #define HIF_USB_TX_STOP BIT(0) + #define HIF_USB_TX_FLUSH BIT(1) + ++- +cgit 1.2.3-1.el7 + -- cgit v1.2.3 From 16e34f7598574bd79aee646deaebfeb878ef7f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= Date: Mon, 8 Jun 2020 01:51:52 +0200 Subject: gnu: flint: Update to 2.6.0. * gnu/packages/algebra.scm (flint): Update to 2.6.0. * gnu/packages/patches/flint-ldconfig.patch: Remove the patch as it got applied upstream. * gnu/local.mk (dist_patch_DATA): Deregister the removed file. --- gnu/packages/patches/flint-ldconfig.patch | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 gnu/packages/patches/flint-ldconfig.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/flint-ldconfig.patch b/gnu/packages/patches/flint-ldconfig.patch deleted file mode 100644 index d7c66e17ab..0000000000 --- a/gnu/packages/patches/flint-ldconfig.patch +++ /dev/null @@ -1,26 +0,0 @@ -Patch by Andreas Enge . -Remedy the absence of ldconfig and explicitly create an additional symbolic -link to the flint library, as discussed privately with upstream. - -diff -r -u flint-2.5.2.orig/configure flint-2.5.2/configure ---- flint-2.5.2.orig/configure 2015-08-13 18:16:22.000000000 +0200 -+++ flint-2.5.2/configure 2015-08-14 17:38:14.316284437 +0200 -@@ -714,6 +714,7 @@ - echo "FLINT_SHARED=$SHARED" >> Makefile - echo "FLINT_LIB=$FLINT_LIB" >> Makefile - echo "FLINT_LIBNAME=$FLINT_LIBNAME" >> Makefile -+echo "FLINT_MAJOR=$FLINT_MAJOR" >> Makefile - echo "FLINT_SOLIB=$FLINT_SOLIB" >> Makefile - echo "EXEEXT=$EXEEXT" >> Makefile - echo "PREFIX=$PREFIX" >> Makefile -diff -r -u flint-2.5.2.orig/Makefile.in flint-2.5.2/Makefile.in ---- flint-2.5.2.orig/Makefile.in 2015-08-13 18:16:22.000000000 +0200 -+++ flint-2.5.2/Makefile.in 2015-08-14 17:38:50.584774817 +0200 -@@ -118,6 +118,7 @@ - $(LDCONFIG) -n "$(CURDIR)"; \ - fi - ln -sf "$(FLINT_LIB)" "$(FLINT_LIBNAME)"; \ -+ ln -sf "$(FLINT_LIB)" "$(FLINT_LIBNAME).$(FLINT_MAJOR)"; \ - - libflint.a: $(OBJS) $(LIB_SOURCES) $(EXT_SOURCES) $(HEADERS) $(EXT_HEADERS) | build build/interfaces - $(AT)$(foreach ext, $(EXTENSIONS), $(foreach dir, $(filter-out %templates, $(patsubst $(ext)/%.h, %, $(wildcard $(ext)/*.h))), mkdir -p build/$(dir); BUILD_DIR=$(CURDIR)/build/$(dir); export BUILD_DIR; MOD_DIR=$(dir); export MOD_DIR; $(MAKE) -f $(CURDIR)/Makefile.subdirs -C $(ext)/$(dir) static || exit $$?;)) -- cgit v1.2.3 From 417eaa88dc8bac3e0e0f7f74d1782629f5eb2150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= Date: Mon, 8 Jun 2020 13:01:16 +0200 Subject: gnu: arb: Build with flint 2.6. Backport an upstream patch to fix a compatibility issue with flint 2.6. * gnu/packages/algebra.scm (arb): Add patch. * gnu/packages/patches/arb-flint-2.6.patch: New file. * gnu/local.mk (dist_patch_DATA): Register new file. --- gnu/packages/patches/arb-flint-2.6.patch | 48 ++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 gnu/packages/patches/arb-flint-2.6.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/arb-flint-2.6.patch b/gnu/packages/patches/arb-flint-2.6.patch new file mode 100644 index 0000000000..98ff5e95b4 --- /dev/null +++ b/gnu/packages/patches/arb-flint-2.6.patch @@ -0,0 +1,48 @@ +From d3d9983231e0f034e86a1e75761627eb8213b704 Mon Sep 17 00:00:00 2001 +From: fredrik +Date: Wed, 29 Apr 2020 13:41:36 +0200 +Subject: [PATCH] handle flint incompatibilities + +--- + fmpr.h | 4 ++++ + fmpz_extras.h | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/fmpr.h b/fmpr.h +index 2204d72e..c6a8c342 100644 +--- a/fmpr.h ++++ b/fmpr.h +@@ -22,7 +22,11 @@ + #include "flint/flint.h" + #include "flint/fmpz.h" + #include "flint/fmpq.h" ++#if __FLINT_RELEASE < 20600 + #include "flint/config.h" ++#else ++#include "flint/flint-config.h" ++#endif + #include "fmpz_extras.h" + + #ifndef flint_abort +diff --git a/fmpz_extras.h b/fmpz_extras.h +index 4fd0538f..486e28c8 100644 +--- a/fmpz_extras.h ++++ b/fmpz_extras.h +@@ -43,6 +43,8 @@ fmpz_add_inline(fmpz_t z, const fmpz_t x, const fmpz_t y) + fmpz_add(z, x, y); + } + ++#if __FLINT_RELEASE < 20600 ++ + static __inline__ void + fmpz_add_si(fmpz_t z, const fmpz_t x, slong y) + { +@@ -61,6 +63,8 @@ fmpz_sub_si(fmpz_t z, const fmpz_t x, slong y) + fmpz_add_ui(z, x, -y); + } + ++#endif ++ + static __inline__ void + fmpz_add_si_inline(fmpz_t z, const fmpz_t x, slong y) + { -- cgit v1.2.3 From 781d03f135c9390d565f16558fd38e7595442745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= Date: Tue, 16 Jun 2020 21:08:20 +0200 Subject: gnu: linbox: Fix linking of dependant packages. * gnu/packages/algebra.scm (linbox)[source]: Add a patch. [inputs]: Move fflas-ffpack to... [propagated-inputs]: ...here. * gnu/packages/patches/linbox-fix-pkgconfig.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/packages/patches/linbox-fix-pkgconfig.patch | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 gnu/packages/patches/linbox-fix-pkgconfig.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/linbox-fix-pkgconfig.patch b/gnu/packages/patches/linbox-fix-pkgconfig.patch new file mode 100644 index 0000000000..c93915fb1b --- /dev/null +++ b/gnu/packages/patches/linbox-fix-pkgconfig.patch @@ -0,0 +1,23 @@ +Backported from: + +From 426eb97ba762c7663884f57ead0909f2aa3cd6a5 Mon Sep 17 00:00:00 2001 +From: Cyril Bouvier +Date: Thu, 17 Jan 2019 16:32:19 +0100 +Subject: [PATCH] Remove @LINBOXSAGE_LIBS@ from linbox.pc.in + +--- + linbox.pc.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/linbox.pc.in b/linbox.pc.in +index 278f127e4..c6b8091eb 100644 +--- a/linbox.pc.in ++++ b/linbox.pc.in +@@ -9,6 +9,6 @@ Description: Exact Linear Algebra library + URL: http://github.com/linbox-team/linbox + Version: @VERSION@ + Requires: fflas-ffpack >= 2.4.0, givaro >= 4.1.0 +-Libs: -L${libdir} -llinbox @LINBOXSAGE_LIBS@ @NTL_LIBS@ @MPFR_LIBS@ @FPLLL_LIBS@ @IML_LIBS@ @FLINT_LIBS@ @OCL_LIBS@ ++Libs: -L${libdir} -llinbox @NTL_LIBS@ @MPFR_LIBS@ @FPLLL_LIBS@ @IML_LIBS@ @FLINT_LIBS@ @OCL_LIBS@ + Cflags: @DEFAULT_CFLAGS@ -DDISABLE_COMMENTATOR -I${includedir} @NTL_CFLAGS@ @MPFR_CFLAGS@ @FPLLL_CFLAGS@ @IML_CFLAGS@ @FLINT_CFLAGS@ + \------------------------------------------------------- -- cgit v1.2.3 From 5b9822cf43f0e568fc42a0a60a7ed4d77e5e9832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= Date: Wed, 17 Jun 2020 02:08:04 +0200 Subject: gnu: Add ECL 16.1.3 for Sage. * gnu/packages/sagemath.scm (ecl-16): New variable. * gnu/packages/patches/ecl-16-format-directive-limit.patch, gnu/packages/patches/ecl-16-ignore-stderr-write-error.patch, gnu/packages/patches/ecl-16-libffi.patch: New files. * gnu/local.mk (dist_patch_DATA): Register the patches. --- .../patches/ecl-16-format-directive-limit.patch | 83 ++++++++++++++++++++++ .../patches/ecl-16-ignore-stderr-write-error.patch | 17 +++++ gnu/packages/patches/ecl-16-libffi.patch | 16 +++++ 3 files changed, 116 insertions(+) create mode 100644 gnu/packages/patches/ecl-16-format-directive-limit.patch create mode 100644 gnu/packages/patches/ecl-16-ignore-stderr-write-error.patch create mode 100644 gnu/packages/patches/ecl-16-libffi.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/ecl-16-format-directive-limit.patch b/gnu/packages/patches/ecl-16-format-directive-limit.patch new file mode 100644 index 0000000000..237db92722 --- /dev/null +++ b/gnu/packages/patches/ecl-16-format-directive-limit.patch @@ -0,0 +1,83 @@ +Patch backported by Sage. + +Fix from upstream that happens to work around +https://trac.sagemath.org/ticket/23011 +diff --git a/src/lsp/format.lsp b/src/lsp/format.lsp +index 77ca799..53b887c 100644 +--- a/src/lsp/format.lsp ++++ b/src/lsp/format.lsp +@@ -307,11 +307,13 @@ + :start (format-directive-start struct) + :end (format-directive-end struct)))) + ++(defconstant +format-directive-limit+ (1+ (char-code #\~))) ++ + #+formatter + (defparameter *format-directive-expanders* +- (make-array char-code-limit :initial-element nil)) ++ (make-array +format-directive-limit+ :initial-element nil)) + (defparameter *format-directive-interpreters* +- (make-array char-code-limit :initial-element nil)) ++ (make-array +format-directive-limit+ :initial-element nil)) + + (defparameter *default-format-error-control-string* nil) + (defparameter *default-format-error-offset* nil) +@@ -550,24 +552,24 @@ + (write-string directive stream) + (interpret-directive-list stream (cdr directives) orig-args args)) + (#-ecl format-directive #+ecl vector ++ (multiple-value-bind ++ (new-directives new-args) ++ (let* ((code (char-code (format-directive-character directive))) ++ (function ++ (and (< code +format-directive-limit+) ++ (svref *format-directive-interpreters* code))) ++ (*default-format-error-offset* ++ (1- (format-directive-end directive)))) ++ (unless function ++ (error 'format-error ++ :complaint "Unknown format directive.")) + (multiple-value-bind + (new-directives new-args) +- (let ((function +- (svref *format-directive-interpreters* +- (char-code (format-directive-character +- directive)))) +- (*default-format-error-offset* +- (1- (format-directive-end directive)))) +- (unless function +- (error 'format-error +- :complaint "Unknown format directive.")) +- (multiple-value-bind +- (new-directives new-args) +- (funcall function stream directive +- (cdr directives) orig-args args) +- (values new-directives new-args))) +- (interpret-directive-list stream new-directives +- orig-args new-args))))) ++ (funcall function stream directive ++ (cdr directives) orig-args args) ++ (values new-directives new-args))) ++ (interpret-directive-list stream new-directives ++ orig-args new-args))))) + args)) + + +@@ -639,11 +641,12 @@ + (values `(write-string ,directive stream) + more-directives)) + (format-directive +- (let ((expander +- (aref *format-directive-expanders* +- (char-code (format-directive-character directive)))) +- (*default-format-error-offset* +- (1- (format-directive-end directive)))) ++ (let* ((code (char-code (format-directive-character directive))) ++ (expander ++ (and (< code +format-directive-limit+) ++ (svref *format-directive-expanders* code))) ++ (*default-format-error-offset* ++ (1- (format-directive-end directive)))) + (if expander + (funcall expander directive more-directives) + (error 'format-error diff --git a/gnu/packages/patches/ecl-16-ignore-stderr-write-error.patch b/gnu/packages/patches/ecl-16-ignore-stderr-write-error.patch new file mode 100644 index 0000000000..42d213c0e9 --- /dev/null +++ b/gnu/packages/patches/ecl-16-ignore-stderr-write-error.patch @@ -0,0 +1,17 @@ +Patch adapted from Sage. +diff -Naur ecl-16.1.2.orig/src/c/file.d ecl-16.1.2/src/c/file.d +--- ecl-16.1.2.orig/src/c/file.d 2016-05-11 13:10:51.867673867 +1200 ++++ ecl-16.1.2/src/c/file.d 2016-05-11 14:44:48.121907307 +1200 +@@ -3354,8 +3354,10 @@ + ecl_disable_interrupts(); + do { + out = fwrite(c, sizeof(char), n, IO_STREAM_FILE(strm)); +- } while (out < n && restartable_io_error(strm, "fwrite")); +- ecl_enable_interrupts(); ++ /* Ignore write errors to stderr to avoid an infinite loop */ ++ } while (out < n && (IO_STREAM_FILE(strm) != stderr) && restartable_io_error(strm, "fwrite")); ++ ++ ecl_enable_interrupts(); + return out; + } + diff --git a/gnu/packages/patches/ecl-16-libffi.patch b/gnu/packages/patches/ecl-16-libffi.patch new file mode 100644 index 0000000000..fc06a07606 --- /dev/null +++ b/gnu/packages/patches/ecl-16-libffi.patch @@ -0,0 +1,16 @@ +Patch adapted from Sage. Allows building ECL on libffi 3.3. +diff --git a/src/c/ffi.d b/src/c/ffi.d +index 8861303e..8a959c23 100644 +--- a/src/c/ffi.d ++++ b/src/c/ffi.d +@@ -133,8 +133,8 @@ static struct { + #elif defined(X86_WIN64) + {@':win64', FFI_WIN64}, + #elif defined(X86_ANY) || defined(X86) || defined(X86_64) +- {@':cdecl', FFI_SYSV}, +- {@':sysv', FFI_SYSV}, ++ {@':cdecl', FFI_UNIX64}, ++ {@':sysv', FFI_UNIX64}, + {@':unix64', FFI_UNIX64}, + #endif + }; -- cgit v1.2.3 From 1649c7d69ae3fe4a3b94b6173431411a2c238168 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Wed, 1 Jul 2020 12:07:15 +0200 Subject: gnu: sqlite: Add locking-mode fix for the Hurd. * gnu/packages/patches/sqlite-hurd.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/sqlite.scm (sqlite)[native-inputs]: Add it when building for the Hurd. [arguments]: Apply it when building for the Hurd. --- gnu/packages/patches/sqlite-hurd.patch | 58 ++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 gnu/packages/patches/sqlite-hurd.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/sqlite-hurd.patch b/gnu/packages/patches/sqlite-hurd.patch new file mode 100644 index 0000000000..d80a2c5be8 --- /dev/null +++ b/gnu/packages/patches/sqlite-hurd.patch @@ -0,0 +1,58 @@ +Adapted from Debian: https://sources.debian.org/patches/sqlite3/3.32.3-1/20-hurd-locking-style.patch +Upstream status: Not upstreamed. + +This patch is needed to get offloading to work. + +Sqlite can use simple file locking mode, but that does not work for the Hurd; +a second sqlite process fails with a "locking protocol" error. + +See also: https://bugs.debian.org/529734. + +diff -purN sqlite-autoconf-3310100/sqlite3.c sqlite-autoconf-3310100-/sqlite3.c +--- sqlite-autoconf-3310100/sqlite3.c 2020-01-27 21:25:19.000000000 +0100 ++++ sqlite-autoconf-3310100-/sqlite3.c 2020-07-01 11:50:13.768333806 +0200 +@@ -33189,7 +33189,7 @@ SQLITE_PRIVATE const char *sqlite3Opcode + # include + #endif + +-#if SQLITE_ENABLE_LOCKING_STYLE ++#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__) + /* # include */ + # include + # include +@@ -35676,7 +35676,7 @@ static int dotlockClose(sqlite3_file *id + ** + ** Omit this section if SQLITE_ENABLE_LOCKING_STYLE is turned off + */ +-#if SQLITE_ENABLE_LOCKING_STYLE ++#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__) + + /* + ** Retry flock() calls that fail with EINTR +@@ -38586,7 +38586,7 @@ IOMETHODS( + 0 /* xShmMap method */ + ) + +-#if SQLITE_ENABLE_LOCKING_STYLE ++#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__) + IOMETHODS( + flockIoFinder, /* Finder function name */ + flockIoMethods, /* sqlite3_io_methods object name */ +@@ -41142,6 +41142,8 @@ SQLITE_API int sqlite3_os_init(void){ + UNIXVFS("unix", autolockIoFinder ), + #elif OS_VXWORKS + UNIXVFS("unix", vxworksIoFinder ), ++#elif defined(__GNU__) ++ UNIXVFS("unix", flockIoFinder ), + #else + UNIXVFS("unix", posixIoFinder ), + #endif +@@ -41151,7 +41153,7 @@ SQLITE_API int sqlite3_os_init(void){ + #if OS_VXWORKS + UNIXVFS("unix-namedsem", semIoFinder ), + #endif +-#if SQLITE_ENABLE_LOCKING_STYLE || OS_VXWORKS ++#if SQLITE_ENABLE_LOCKING_STYLE || OS_VXWORKS || defined(__GNU__) + UNIXVFS("unix-posix", posixIoFinder ), + #endif + #if SQLITE_ENABLE_LOCKING_STYLE -- cgit v1.2.3 From bc6239ba078434cefe09194cba02ad1cfed87cc7 Mon Sep 17 00:00:00 2001 From: Jan Wielkiewicz Date: Sun, 12 Jul 2020 18:00:47 +0200 Subject: gnu: opendht: Add patch. The 2.1.4 release of opendht contains a bug, preventing it's use with recent releases of Jami. This minor patch [1] resolves this issue, and should be possible to remove with the next release. 1: https://github.com/savoirfairelinux/opendht/commit/e2b39dd3a0742853e00f9c3e8c46c911da20bed7 * gnu/packages/patches/opendht-fix-jami.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/networking.scm (opendht)[source]: Apply the patch. Signed-off-by: Christopher Baines --- gnu/packages/patches/opendht-fix-jami.patch | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 gnu/packages/patches/opendht-fix-jami.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/opendht-fix-jami.patch b/gnu/packages/patches/opendht-fix-jami.patch new file mode 100644 index 0000000000..9718a84a41 --- /dev/null +++ b/gnu/packages/patches/opendht-fix-jami.patch @@ -0,0 +1,33 @@ +From e2b39dd3a0742853e00f9c3e8c46c911da20bed7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Adrien=20B=C3=A9raud?= +Date: Tue, 30 Jun 2020 10:42:49 -0400 +Subject: [PATCH 1/4] http/request: make terminate public + +--- + include/opendht/http.h | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/include/opendht/http.h b/include/opendht/http.h +index cc8d5f9..46b722c 100644 +--- a/include/opendht/http.h ++++ b/include/opendht/http.h +@@ -294,6 +294,7 @@ public: + * User action to cancel the Request and call the completion callbacks. + */ + void cancel(); ++ void terminate(const asio::error_code& ec); + + private: + using OnCompleteCb = std::function; +@@ -320,8 +321,6 @@ private: + + void connect(std::vector&& endpoints, HandlerCb cb = {}); + +- void terminate(const asio::error_code& ec); +- + void post(); + + void handle_request(const asio::error_code& ec); +-- +2.27.0 + -- cgit v1.2.3 From 000498784f4aae34742b28e72175cebce4cff01e Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 13 Jul 2020 09:02:56 +0300 Subject: gnu: libreoffice: Update to 6.4.5.2. * gnu/packages/libreoffice.scm (libreoffice): Update to 6.4.5.2. [source]: Remove patch. * gnu/packages/patches/libreoffice-poppler-compat.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/packages/patches/libreoffice-poppler-compat.patch | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 gnu/packages/patches/libreoffice-poppler-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/libreoffice-poppler-compat.patch b/gnu/packages/patches/libreoffice-poppler-compat.patch deleted file mode 100644 index 8dc0b60a12..0000000000 --- a/gnu/packages/patches/libreoffice-poppler-compat.patch +++ /dev/null @@ -1,19 +0,0 @@ -Fix type mismatch with Poppler 0.86. - -Taken from Arch Linux: -https://git.archlinux.org/svntogit/packages.git/tree/trunk/libreoffice-poppler-0.86.patch?h=packages/libreoffice-fresh - -diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx ---- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx -+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx -@@ -563,7 +563,9 @@ void PDFOutDev::processLink(Link* link, Catalog*) - if (!(pAction && pAction->getKind() == actionURI)) - return; - --#if POPPLER_CHECK_VERSION(0, 72, 0) -+#if POPPLER_CHECK_VERSION(0, 86, 0) -+ const char* pURI = static_cast(pAction)->getURI().c_str(); -+#elif POPPLER_CHECK_VERSION(0, 72, 0) - const char* pURI = static_cast(pAction)->getURI()->c_str(); - #else - const char* pURI = static_cast(pAction)->getURI()->getCString(); -- cgit v1.2.3 From dab195957bdd75eba49ee3d08adc5ff805d4f497 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 27 Jun 2020 15:11:05 +0200 Subject: gnu: xpra: Upgrade to 4.0.2. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/xorg.scm (xpra)[version]: Upgrade. [source]: Add patch. [inputs]: Adjust to use Python 3 dependencies. [arguments]: Use Python 3, add phases to patch hardcoded binary paths. * gnu/local.mk (dist_patch_DATA): Add patch. * gnu/packages/patches/xpra-4.0.1-systemd-run.patch: New file. Signed-off-by: Ludovic Courtès --- gnu/packages/patches/xpra-4.0.1-systemd-run.patch | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 gnu/packages/patches/xpra-4.0.1-systemd-run.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/xpra-4.0.1-systemd-run.patch b/gnu/packages/patches/xpra-4.0.1-systemd-run.patch new file mode 100644 index 0000000000..1ea11830a5 --- /dev/null +++ b/gnu/packages/patches/xpra-4.0.1-systemd-run.patch @@ -0,0 +1,34 @@ +Disable systemd-run if the command is not found. + +diff -Naur xpra-4.0.1/xpra/scripts/main.py xpra-4.0.1.patched/xpra/scripts/main.py +--- xpra-4.0.1/xpra/scripts/main.py 2020-05-17 18:12:15.000000000 +0200 ++++ xpra-4.0.1.patched/xpra/scripts/main.py 2020-06-01 12:12:18.500257507 +0200 +@@ -312,16 +312,18 @@ + if not is_systemd_pid1(): + return False + #test it: +- cmd = ["systemd-run", "--quiet", "--user", "--scope", "--", "true"] +- proc = Popen(cmd, stdin=None, stdout=None, stderr=None, shell=False) +- r = pollwait(proc, timeout=1) +- if r is None: +- try: +- proc.terminate() +- except Exception: +- pass +- return r==0 +- ++ try: ++ cmd = ["systemd-run", "--quiet", "--user", "--scope", "--", "true"] ++ proc = Popen(cmd, stdin=None, stdout=None, stderr=None, shell=False) ++ r = pollwait(proc, timeout=1) ++ if r is None: ++ try: ++ proc.terminate() ++ except Exception: ++ pass ++ return r==0 ++ except FileNotFoundError: ++ return False + + def run_mode(script_file, error_cb, options, args, mode, defaults): + #configure default logging handler: -- cgit v1.2.3 From dec0217f6e21a2f48328aaff5448dcf2f4fea7d9 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 15 Jul 2020 20:08:10 +0200 Subject: gnu: python-shiboken-2, python-pyside-2: Update to 5.14.2.3. * gnu/packages/patches/qtbase-absolute-runpath.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/qt.scm (qtbase/next): New variable. * gnu/packages/qt.scm (python-shiboken-2): Update to 5.14.2.3. [source](uri): Adjust for tarball rename. [inputs]: Use the default CLANG-TOOLCHAIN. (python-pyside-2)[inputs]: Likewise. (python-pyside-2-tools)[inputs]: Change from QTBASE to QTBASE/NEXT. --- gnu/packages/patches/qtbase-absolute-runpath.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 gnu/packages/patches/qtbase-absolute-runpath.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/qtbase-absolute-runpath.patch b/gnu/packages/patches/qtbase-absolute-runpath.patch new file mode 100644 index 0000000000..cec4ddc0a3 --- /dev/null +++ b/gnu/packages/patches/qtbase-absolute-runpath.patch @@ -0,0 +1,17 @@ +Do not use $ORIGIN in RUNPATH so that executables can be copied elsewhere and +still be expected to work (needed for python-pyside-2-tools). + +diff --git a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf +--- a/mkspecs/common/linux.conf ++++ b/mkspecs/common/linux.conf +@@ -10,8 +10,8 @@ QMAKE_CFLAGS_THREAD += -D_REENTRANT + QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD + QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections + +-QMAKE_LFLAGS_REL_RPATH = -Wl,-z,origin +-QMAKE_REL_RPATH_BASE = $ORIGIN ++QMAKE_LFLAGS_REL_RPATH = ++QMAKE_REL_RPATH_BASE = + + QMAKE_INCDIR = + QMAKE_LIBDIR = -- cgit v1.2.3 From 15076369062852c266bc697fc54b2ba157aceed0 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 15 Jul 2020 20:29:26 +0200 Subject: gnu: python-tinycss2: Fix test failure. Fixes . Reported by Michael Rohleder . * gnu/packages/patches/python-tinycss2-flake8-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/python-web.scm (python-tinycss2)[source](patches): New field. --- .../patches/python-tinycss2-flake8-compat.patch | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 gnu/packages/patches/python-tinycss2-flake8-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/python-tinycss2-flake8-compat.patch b/gnu/packages/patches/python-tinycss2-flake8-compat.patch new file mode 100644 index 0000000000..a66eb42fa1 --- /dev/null +++ b/gnu/packages/patches/python-tinycss2-flake8-compat.patch @@ -0,0 +1,36 @@ +Fix test failure that occurs with recent versions of Flake8. + +Taken from upstream: +https://github.com/Kozea/tinycss2/commit/6556604fb98c2153412384d6f0f705db2da1aa60 + +diff --git a/tinycss2/css-parsing-tests/make_color3_hsl.py b/tinycss2/css-parsing-tests/make_color3_hsl.py +index d1fd3a6..56fda0c 100644 +--- a/tinycss2/css-parsing-tests/make_color3_hsl.py ++++ b/tinycss2/css-parsing-tests/make_color3_hsl.py +@@ -8,16 +8,17 @@ def trim(s): + print('[') + print(',\n'.join( + '"hsl%s(%s, %s%%, %s%%%s)", [%s, %s, %s, %s]' % ( +- ('a' if a is not None else '', h, +- trim(str(s / 10.)), trim(str(l / 10.)), +- ', %s' % a if a is not None else '') + ++ ('a' if alpha is not None else '', hue, ++ trim(str(saturation / 10.)), trim(str(light / 10.)), ++ ', %s' % alpha if alpha is not None else '') + + tuple(trim(str(round(v, 10))) +- for v in colorsys.hls_to_rgb(h / 360., l / 1000., s / 1000.)) + +- (a if a is not None else 1,) ++ for v in colorsys.hls_to_rgb( ++ hue / 360., light / 1000., saturation / 1000.)) + ++ (alpha if alpha is not None else 1,) + ) +- for a in [None, 1, .2, 0] +- for l in range(0, 1001, 125) +- for s in range(0, 1001, 125) +- for h in range(0, 360, 30) ++ for alpha in [None, 1, .2, 0] ++ for light in range(0, 1001, 125) ++ for saturation in range(0, 1001, 125) ++ for hue in range(0, 360, 30) + )) + print(']') -- cgit v1.2.3 From 7233b19fde688d79d19ed1614a804c1d80f55260 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 10 Jun 2020 21:28:53 -0400 Subject: gnu: Transmission: Update to 3.0.0. * gnu/packages/bittorrent.scm (transmission): Update to 3.0.0. [source]: Remove obsolete patch. * gnu/packages/patches/transmission-CVE-2018-10756.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- .../patches/transmission-CVE-2018-10756.patch | 71 ---------------------- 1 file changed, 71 deletions(-) delete mode 100644 gnu/packages/patches/transmission-CVE-2018-10756.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/transmission-CVE-2018-10756.patch b/gnu/packages/patches/transmission-CVE-2018-10756.patch deleted file mode 100644 index f9bdcf60aa..0000000000 --- a/gnu/packages/patches/transmission-CVE-2018-10756.patch +++ /dev/null @@ -1,71 +0,0 @@ -Fix CVE-2018-10756: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-10756 - -Patch copied from Fedora: - -https://src.fedoraproject.org/rpms/transmission/blob/master/f/2123adf8e5e1c2b48791f9d22fc8c747e974180e.patch - ---- a/libtransmission/variant.c 2018-05-01 12:21:08.000000000 -0500 -+++ b/libtransmission/variant.c 2020-05-18 10:21:27.554214128 -0500 -@@ -820,7 +820,7 @@ - struct SaveNode - { - const tr_variant * v; -- tr_variant sorted; -+ tr_variant* sorted; - size_t childIndex; - bool isVisited; - }; -@@ -849,26 +849,33 @@ - - qsort (tmp, n, sizeof (struct KeyIndex), compareKeyIndex); - -- tr_variantInitDict (&node->sorted, n); -+ node->sorted = tr_new(tr_variant, 1); -+ tr_variantInitDict (node->sorted, n); - for (i=0; isorted.val.l.vals[i] = *tmp[i].val; -+ node->sorted->val.l.vals[i] = *tmp[i].val; - node->sorted.val.l.count = n; - - tr_free (tmp); - -- node->v = &node->sorted; -+ v = node->sorted; - } - else - { -- node->v = v; -+ node->sorted = NULL; - } -+ -+ node->v = v; - } - - static void - nodeDestruct (struct SaveNode * node) - { -- if (node->v == &node->sorted) -- tr_free (node->sorted.val.l.vals); -+ //TR_ASSERT(node != NULL); -+ if (node->sorted != NULL) -+ { -+ tr_free(node->sorted->val.l.vals); -+ tr_free(node->sorted); -+ } - } - - /** ---- a/libtransmission/variant.c 2020-05-18 10:21:49.000000000 -0500 -+++ b/libtransmission/variant.c 2020-05-18 10:24:34.673648865 -0500 -@@ -853,7 +853,7 @@ - tr_variantInitDict (node->sorted, n); - for (i=0; isorted->val.l.vals[i] = *tmp[i].val; -- node->sorted.val.l.count = n; -+ node->sorted->val.l.count = n; - - tr_free (tmp); - - -- cgit v1.2.3 From f5340e004590d3775157b335efa8a1525605a55c Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 10 Jul 2020 17:48:06 +0200 Subject: gnu: Add tao. * gnu/packages/patches/tao-add-missing-headers.patch, gnu/packages/patches/tao-fix-parser-types.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/audio.scm (tao): New variable. --- gnu/packages/patches/tao-add-missing-headers.patch | 102 +++++++++++++++++++++ gnu/packages/patches/tao-fix-parser-types.patch | 26 ++++++ 2 files changed, 128 insertions(+) create mode 100644 gnu/packages/patches/tao-add-missing-headers.patch create mode 100644 gnu/packages/patches/tao-fix-parser-types.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/tao-add-missing-headers.patch b/gnu/packages/patches/tao-add-missing-headers.patch new file mode 100644 index 0000000000..f117281993 --- /dev/null +++ b/gnu/packages/patches/tao-add-missing-headers.patch @@ -0,0 +1,102 @@ +Taken from Debian: +https://salsa.debian.org/multimedia-team/taopm/-/raw/master/debian/patches/01-add-missing-headers.diff + +Description: Adding missing headers +Author: Tiago Bortoletto Vaz +Last-Update: 2013-04-17 +--- a/libtao/Tao.cc ++++ b/libtao/Tao.cc +@@ -18,6 +18,7 @@ + + #include "Tao.h" + #include ++#include + + extern Tao tao; + float &Time = tao.synthesisEngine.time; +--- a/libtao/TaoDevice.cc ++++ b/libtao/TaoDevice.cc +@@ -20,6 +20,7 @@ + #include "Tao.h" + #include "TaoAccessPoint.h" + #include "TaoInstrument.h" ++#include + + TaoDevice::TaoDevice() + { +--- a/libtao/TaoInstrument.cc ++++ b/libtao/TaoInstrument.cc +@@ -23,6 +23,7 @@ + //#include + #include + #include ++#include + + float TaoInstrument::defaultMass=3.5; // Set to optimum value for + // frequency response of +--- a/libtao/TaoOutput.cc ++++ b/libtao/TaoOutput.cc +@@ -24,6 +24,7 @@ + #include + #include "TaoOutput.h" + #include "Tao.h" ++#include + + extern Tao tao; + +--- a/libtao/TaoPitch.cc ++++ b/libtao/TaoPitch.cc +@@ -30,6 +30,7 @@ + #include "TaoPitch.h" + #include + #include ++#include + + // This class allows pitches and frequencies to be specified in a number of + // different formats including the following: +--- a/taoparse/taoparser.yy ++++ b/taoparse/taoparser.yy +@@ -19,7 +19,8 @@ + + #include + #include +-#include ++#include ++#include + #include "taoparserdefs.h" + + int yyerror(char *s); +--- a/libtao/TaoGraphicsEngine.cc ++++ b/libtao/TaoGraphicsEngine.cc +@@ -27,7 +27,8 @@ + #include "TaoInstrument.h" + #include "TaoAccessPoint.h" + #include "TaoDevice.h" +-#include ++#include ++#include + + extern Tao tao; + extern void taoMasterTick(); +--- a/tao2aiff/tao2aiff.cc ++++ b/tao2aiff/tao2aiff.cc +@@ -25,6 +25,8 @@ + #include + #include "audiofile.h" + #include "tao2aiff.h" ++#include ++#include + + + main(int argc, char **argv) +--- a/tao2wav/tao2wav.cc ++++ b/tao2wav/tao2wav.cc +@@ -25,6 +25,8 @@ + #include + #include "audiofile.h" + #include "tao2wav.h" ++#include ++#include + + main(int argc, char **argv) + { diff --git a/gnu/packages/patches/tao-fix-parser-types.patch b/gnu/packages/patches/tao-fix-parser-types.patch new file mode 100644 index 0000000000..5dcf3fc2ea --- /dev/null +++ b/gnu/packages/patches/tao-fix-parser-types.patch @@ -0,0 +1,26 @@ +Taken from Debian: +https://salsa.debian.org/multimedia-team/taopm/-/raw/master/debian/patches/02-fix-parser-yyerror.diff + +Description: Use a constant char, dummy comment. +Author: Tiago Bortoletto Vaz +Last-Update: 2013-04-17 +--- a/taoparse/taoparser.yy ++++ b/taoparse/taoparser.yy +@@ -23,7 +23,7 @@ + #include + #include "taoparserdefs.h" + +-int yyerror(char *s); ++int yyerror(const char *s); + + //#ifdef LINUX + int yylex(void); +@@ -2924,7 +2924,7 @@ + } + + +-int yyerror (char *s) ++int yyerror (const char *s) + { + parse_error(what_I_expected_here); + std::cout << "PARSE_FAILED"; -- cgit v1.2.3 From 72a91d74cec01bfcfcef2b62c5b327fab82950b6 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 3 Jul 2020 00:28:57 +0200 Subject: gnu: Add ganeti. * gnu/packages/virtualization.scm (system->qemu-target, ganeti): New variables. * gnu/packages/patches/ganeti-deterministic-manual.patch, gnu/packages/patches/ganeti-disable-version-symlinks.patch, gnu/packages/patches/ganeti-drbd-compat.patch, gnu/packages/patches/ganeti-haskell-pythondir.patch, gnu/packages/patches/ganeti-os-disk-size.patch, gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch, gnu/packages/patches/ganeti-shepherd-master-failover.patch, gnu/packages/patches/ganeti-shepherd-support.patch: New files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- .../patches/ganeti-deterministic-manual.patch | 16 ++ .../patches/ganeti-disable-version-symlinks.patch | 136 +++++++++++++++++ gnu/packages/patches/ganeti-drbd-compat.patch | 166 +++++++++++++++++++++ .../patches/ganeti-haskell-pythondir.patch | 66 ++++++++ gnu/packages/patches/ganeti-os-disk-size.patch | 17 +++ .../patches/ganeti-preserve-PYTHONPATH.patch | 21 +++ .../patches/ganeti-shepherd-master-failover.patch | 18 +++ gnu/packages/patches/ganeti-shepherd-support.patch | 87 +++++++++++ 8 files changed, 527 insertions(+) create mode 100644 gnu/packages/patches/ganeti-deterministic-manual.patch create mode 100644 gnu/packages/patches/ganeti-disable-version-symlinks.patch create mode 100644 gnu/packages/patches/ganeti-drbd-compat.patch create mode 100644 gnu/packages/patches/ganeti-haskell-pythondir.patch create mode 100644 gnu/packages/patches/ganeti-os-disk-size.patch create mode 100644 gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch create mode 100644 gnu/packages/patches/ganeti-shepherd-master-failover.patch create mode 100644 gnu/packages/patches/ganeti-shepherd-support.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/ganeti-deterministic-manual.patch b/gnu/packages/patches/ganeti-deterministic-manual.patch new file mode 100644 index 0000000000..2d90aa740e --- /dev/null +++ b/gnu/packages/patches/ganeti-deterministic-manual.patch @@ -0,0 +1,16 @@ +Sort the ecode list in the gnt-cluster manual for deterministic results. + +Submitted upstream: . + +diff --git a/lib/build/sphinx_ext.py b/lib/build/sphinx_ext.py +--- a/lib/build/sphinx_ext.py ++++ b/lib/build/sphinx_ext.py +@@ -108,7 +108,7 @@ CV_ECODES_DOC = "ecodes" + # pylint: disable=W0621 + CV_ECODES_DOC_LIST = [(name, doc) for (_, name, doc) in constants.CV_ALL_ECODES] + DOCUMENTED_CONSTANTS = { +- CV_ECODES_DOC: CV_ECODES_DOC_LIST, ++ CV_ECODES_DOC: sorted(CV_ECODES_DOC_LIST, key=lambda tup: tup[0]), + } + + diff --git a/gnu/packages/patches/ganeti-disable-version-symlinks.patch b/gnu/packages/patches/ganeti-disable-version-symlinks.patch new file mode 100644 index 0000000000..a5f347cfc6 --- /dev/null +++ b/gnu/packages/patches/ganeti-disable-version-symlinks.patch @@ -0,0 +1,136 @@ +This patch adds a new "--disable-version-links" configuration option +that allows installing to the standard GNU installation directories +instead of having to add symlinks in /etc/ganeti/{lib,share} that +points to the right $ganeti/{lib,share}/$version. Mainly to reduce +service complexity, and because Guix users can install as many versions +of Ganeti they can muster without resorting to such hacks. + +diff --git a/Makefile.am b/Makefile.am +--- a/Makefile.am ++++ b/Makefile.am +@@ -66,11 +66,16 @@ SHELL_ENV_INIT = autotools/shell-env-init + # so, if some currently architecture-independent executable is replaced by an + # architecture-dependent one (and hence has to go under $(versiondir)), add a link + # under $(versionedsharedir) but do not change the external links. ++# ++# As of Ganeti 3.0, it is possible to disable this behavior by passing ++# --disable-version-links, in which case the standard GNU installation ++# directories are used. + if USE_VERSION_FULL + DIRVERSION=$(VERSION_FULL) + else + DIRVERSION=$(VERSION_MAJOR).$(VERSION_MINOR) + endif ++if USE_VERSION_LINKS + versiondir = $(libdir)/ganeti/$(DIRVERSION) + defaultversiondir = $(libdir)/ganeti/default + versionedsharedir = $(prefix)/share/ganeti/$(DIRVERSION) +@@ -90,6 +95,18 @@ gntpythondir = $(versionedsharedir) + pkgpython_bindir = $(versionedsharedir) + gnt_python_sbindir = $(versionedsharedir) + tools_pythondir = $(versionedsharedir) ++else ++myexeclibdir = $(pkglibdir) ++pkgpython_rpc_stubdir = $(pkgpythondir)/rpc/stub ++gntpythondir = $(sbindir) ++pkgpython_bindir = $(pkglibdir) ++gnt_python_sbindir = $(sbindir) ++tools_pythondir = $(pkglibdir) ++versionedsharedir = $(pkglibdir) ++# This is a hack but works because the only user does $(versiondir)$(datadir). ++versiondir = ++endif !USE_VERSION_LINKS ++ + + clientdir = $(pkgpythondir)/client + cmdlibdir = $(pkgpythondir)/cmdlib +@@ -2356,6 +2373,7 @@ src/AutoConf.hs: Makefile src/AutoConf.hs.in $(PRINT_PY_CONSTANTS) \ + -DVERSION_SUFFIX="$(VERSION_SUFFIX)" \ + -DVERSION_FULL="$(VERSION_FULL)" \ + -DDIRVERSION="$(DIRVERSION)" \ ++ -DUSE_VERSION_LINKS="$(USE_VERSION_LINKS)" \ + -DLOCALSTATEDIR="$(localstatedir)" \ + -DSYSCONFDIR="$(sysconfdir)" \ + -DSSH_CONFIG_DIR="$(SSH_CONFIG_DIR)" \ +@@ -2857,6 +2875,7 @@ install-exec-local: + @mkdir_p@ "$(DESTDIR)${localstatedir}/lib/ganeti" \ + "$(DESTDIR)${localstatedir}/log/ganeti" \ + "$(DESTDIR)${localstatedir}/run/ganeti" ++if USE_VERSION_LINKS + for dir in $(SYMLINK_TARGET_DIRS); do \ + @mkdir_p@ $(DESTDIR)$$dir; \ + done +@@ -2892,7 +2911,8 @@ install-exec-local: + if INSTALL_SYMLINKS + $(LN_S) -f $(versionedsharedir) $(DESTDIR)$(sysconfdir)/ganeti/share + $(LN_S) -f $(versiondir) $(DESTDIR)$(sysconfdir)/ganeti/lib +-endif ++endif INSTALL_SYMLINKS ++endif USE_VERSION_LINKS + + .PHONY: apidoc + if WANT_HSAPIDOC +diff --git a/configure.ac b/configure.ac +--- a/configure.ac ++++ b/configure.ac +@@ -29,6 +29,23 @@ AC_SUBST([BINDIR], $bindir) + AC_SUBST([SBINDIR], $sbindir) + AC_SUBST([MANDIR], $mandir) + ++# --enable-version-links ++AC_ARG_ENABLE([version-links], ++ [AS_HELP_STRING([--enable-version-links], ++ m4_normalize([install ganeti to version-specific ++ subdirectories to allow installing multiple versions ++ in parallel (default: enabled)]))], ++ [[if test "$enableval" != no; then ++ USE_VERSION_LINKS=True ++ else ++ USE_VERSION_LINKS=False ++ fi ++ ]], ++ [USE_VERSION_LINKS=True ++ ]) ++AC_SUBST(USE_VERSION_LINKS, $USE_VERSION_LINKS) ++AM_CONDITIONAL([USE_VERSION_LINKS], [test "$USE_VERSION_LINKS" = True]) ++ + # --enable-versionfull + AC_ARG_ENABLE([versionfull], + [AS_HELP_STRING([--enable-versionfull], +diff --git a/lib/bootstrap.py b/lib/bootstrap.py +--- a/lib/bootstrap.py ++++ b/lib/bootstrap.py +@@ -944,7 +944,7 @@ def SetupNodeDaemon(opts, cluster_name, node, ssh_port): + debug=opts.debug, verbose=opts.verbose, + use_cluster_key=True, ask_key=opts.ssh_key_check, + strict_host_check=opts.ssh_key_check, +- ensure_version=True) ++ ensure_version=constants.USE_VERSION_LINKS) + + _WaitForSshDaemon(node, ssh_port) + _WaitForNodeDaemon(node) +diff --git a/src/AutoConf.hs.in b/src/AutoConf.hs.in +--- a/src/AutoConf.hs.in ++++ b/src/AutoConf.hs.in +@@ -64,6 +64,9 @@ versionFull = "VERSION_FULL" + dirVersion :: String + dirVersion = "DIRVERSION" + ++useVersionLinks :: Bool ++useVersionLinks = USE_VERSION_LINKS ++ + localstatedir :: String + localstatedir = "LOCALSTATEDIR" + +diff --git a/src/Ganeti/Constants.hs b/src/Ganeti/Constants.hs +--- a/src/Ganeti/Constants.hs ++++ b/src/Ganeti/Constants.hs +@@ -164,5 +164,8 @@ versionRevision = AutoConf.versionRevision + dirVersion :: String + dirVersion = AutoConf.dirVersion + ++useVersionLinks :: Bool ++useVersionLinks = AutoConf.useVersionLinks ++ + osApiV10 :: Int + osApiV10 = 10 diff --git a/gnu/packages/patches/ganeti-drbd-compat.patch b/gnu/packages/patches/ganeti-drbd-compat.patch new file mode 100644 index 0000000000..32f46bc7ed --- /dev/null +++ b/gnu/packages/patches/ganeti-drbd-compat.patch @@ -0,0 +1,166 @@ +This patch adds support for newer versions of DRBD. + +Submitted upstream: . + +diff --git a/lib/storage/drbd.py b/lib/storage/drbd.py +--- a/lib/storage/drbd.py ++++ b/lib/storage/drbd.py +@@ -315,6 +315,13 @@ class DRBD8Dev(base.BlockDev): + """ + return self._show_info_cls.GetDevInfo(self._GetShowData(minor)) + ++ @staticmethod ++ def _NeedsLocalSyncerParams(): ++ # For DRBD >= 8.4, syncer init must be done after local, not in net. ++ info = DRBD8.GetProcInfo() ++ version = info.GetVersion() ++ return version["k_minor"] >= 4 ++ + def _MatchesLocal(self, info): + """Test if our local config matches with an existing device. + +@@ -397,6 +404,20 @@ class DRBD8Dev(base.BlockDev): + base.ThrowError("drbd%d: can't attach local disk: %s", + minor, result.output) + ++ def _WaitForMinorSyncParams(): ++ """Call _SetMinorSyncParams and raise RetryAgain on errors. ++ """ ++ if self._SetMinorSyncParams(minor, self.params): ++ raise utils.RetryAgain() ++ ++ if self._NeedsLocalSyncerParams(): ++ # Retry because disk config for DRBD resource may be still uninitialized. ++ try: ++ utils.Retry(_WaitForMinorSyncParams, 1.0, 5.0) ++ except utils.RetryTimeout as e: ++ base.ThrowError("drbd%d: can't set the synchronization parameters: %s" % ++ (minor, utils.CommaJoin(e.args[0]))) ++ + def _AssembleNet(self, minor, net_info, dual_pri=False, hmac=None, + secret=None): + """Configure the network part of the device. +@@ -432,21 +453,24 @@ class DRBD8Dev(base.BlockDev): + # sync speed only after setting up both sides can race with DRBD + # connecting, hence we set it here before telling DRBD anything + # about its peer. +- sync_errors = self._SetMinorSyncParams(minor, self.params) +- if sync_errors: +- base.ThrowError("drbd%d: can't set the synchronization parameters: %s" % +- (minor, utils.CommaJoin(sync_errors))) ++ ++ if not self._NeedsLocalSyncerParams(): ++ sync_errors = self._SetMinorSyncParams(minor, self.params) ++ if sync_errors: ++ base.ThrowError("drbd%d: can't set the synchronization parameters: %s" % ++ (minor, utils.CommaJoin(sync_errors))) + + family = self._GetNetFamily(minor, lhost, rhost) + +- cmd = self._cmd_gen.GenNetInitCmd(minor, family, lhost, lport, ++ cmds = self._cmd_gen.GenNetInitCmds(minor, family, lhost, lport, + rhost, rport, protocol, + dual_pri, hmac, secret, self.params) + +- result = utils.RunCmd(cmd) +- if result.failed: +- base.ThrowError("drbd%d: can't setup network: %s - %s", +- minor, result.fail_reason, result.output) ++ for cmd in cmds: ++ result = utils.RunCmd(cmd) ++ if result.failed: ++ base.ThrowError("drbd%d: can't setup network: %s - %s", ++ minor, result.fail_reason, result.output) + + def _CheckNetworkConfig(): + info = self._GetShowInfo(minor) +@@ -463,19 +487,20 @@ class DRBD8Dev(base.BlockDev): + base.ThrowError("drbd%d: timeout while configuring network", minor) + + # Once the assembly is over, try to set the synchronization parameters +- try: +- # The minor may not have been set yet, requiring us to set it at least +- # temporarily +- old_minor = self.minor +- self._SetFromMinor(minor) +- sync_errors = self.SetSyncParams(self.params) +- if sync_errors: +- base.ThrowError("drbd%d: can't set the synchronization parameters: %s" % +- (self.minor, utils.CommaJoin(sync_errors))) +- finally: +- # Undo the change, regardless of whether it will have to be done again +- # soon +- self._SetFromMinor(old_minor) ++ if not self._NeedsLocalSyncerParams(): ++ try: ++ # The minor may not have been set yet, requiring us to set it at least ++ # temporarily ++ old_minor = self.minor ++ self._SetFromMinor(minor) ++ sync_errors = self.SetSyncParams(self.params) ++ if sync_errors: ++ base.ThrowError("drbd%d: can't set the synchronization parameters: %s" % ++ (self.minor, utils.CommaJoin(sync_errors))) ++ finally: ++ # Undo the change, regardless of whether it will have to be done again ++ # soon ++ self._SetFromMinor(old_minor) + + @staticmethod + def _GetNetFamily(minor, lhost, rhost): +diff --git a/lib/storage/drbd_cmdgen.py b/lib/storage/drbd_cmdgen.py +--- a/lib/storage/drbd_cmdgen.py ++++ b/lib/storage/drbd_cmdgen.py +@@ -56,7 +56,7 @@ class BaseDRBDCmdGenerator(object): + def GenLocalInitCmds(self, minor, data_dev, meta_dev, size_mb, params): + raise NotImplementedError + +- def GenNetInitCmd(self, minor, family, lhost, lport, rhost, rport, protocol, ++ def GenNetInitCmds(self, minor, family, lhost, lport, rhost, rport, protocol, + dual_pri, hmac, secret, params): + raise NotImplementedError + +@@ -138,7 +138,7 @@ class DRBD83CmdGenerator(BaseDRBDCmdGenerator): + + return [args] + +- def GenNetInitCmd(self, minor, family, lhost, lport, rhost, rport, protocol, ++ def GenNetInitCmds(self, minor, family, lhost, lport, rhost, rport, protocol, + dual_pri, hmac, secret, params): + args = ["drbdsetup", self._DevPath(minor), "net", + "%s:%s:%s" % (family, lhost, lport), +@@ -155,7 +155,7 @@ class DRBD83CmdGenerator(BaseDRBDCmdGenerator): + if params[constants.LDP_NET_CUSTOM]: + args.extend(shlex.split(params[constants.LDP_NET_CUSTOM])) + +- return args ++ return [args] + + def GenSyncParamsCmd(self, minor, params): + args = ["drbdsetup", self._DevPath(minor), "syncer"] +@@ -345,8 +345,14 @@ class DRBD84CmdGenerator(BaseDRBDCmdGenerator): + + return cmds + +- def GenNetInitCmd(self, minor, family, lhost, lport, rhost, rport, protocol, ++ def GenNetInitCmds(self, minor, family, lhost, lport, rhost, rport, protocol, + dual_pri, hmac, secret, params): ++ cmds = [] ++ ++ cmds.append(["drbdsetup", "new-resource", self._GetResource(minor)]) ++ cmds.append(["drbdsetup", "new-minor", self._GetResource(minor), ++ str(minor), "0"]) ++ + args = ["drbdsetup", "connect", self._GetResource(minor), + "%s:%s:%s" % (family, lhost, lport), + "%s:%s:%s" % (family, rhost, rport), +@@ -362,7 +368,8 @@ class DRBD84CmdGenerator(BaseDRBDCmdGenerator): + if params[constants.LDP_NET_CUSTOM]: + args.extend(shlex.split(params[constants.LDP_NET_CUSTOM])) + +- return args ++ cmds.append(args) ++ return cmds + + def GenSyncParamsCmd(self, minor, params): + args = ["drbdsetup", "disk-options", minor] diff --git a/gnu/packages/patches/ganeti-haskell-pythondir.patch b/gnu/packages/patches/ganeti-haskell-pythondir.patch new file mode 100644 index 0000000000..fa77771839 --- /dev/null +++ b/gnu/packages/patches/ganeti-haskell-pythondir.patch @@ -0,0 +1,66 @@ +This patch allows the Haskell daemons to locate Python libraries +installed to a non-standard pythondir. It is necessary because Guix +does not use versionedsharedir (see related patch that disables it). + +diff --git a/Makefile.am b/Makefile.am +--- a/Makefile.am ++++ b/Makefile.am +@@ -83,6 +83,7 @@ myexeclibdir = $(pkglibdir) + bindir = $(versiondir)/$(BINDIR) + sbindir = $(versiondir)$(SBINDIR) + mandir = $(versionedsharedir)/root$(MANDIR) ++pythondir = $(versionedsharedir) + pkgpythondir = $(versionedsharedir)/ganeti + pkgpython_rpc_stubdir = $(versionedsharedir)/ganeti/rpc/stub + gntpythondir = $(versionedsharedir) +@@ -2386,6 +2387,7 @@ src/AutoConf.hs: Makefile src/AutoConf.hs.in $(PRINT_PY_CONSTANTS) \ + -DPKGLIBDIR="$(libdir)/ganeti" \ + -DSHAREDIR="$(prefix)/share/ganeti" \ + -DVERSIONEDSHAREDIR="$(versionedsharedir)" \ ++ -DPYTHONDIR="$(pythondir)" \ + -DDRBD_BARRIERS="$(DRBD_BARRIERS)" \ + -DDRBD_NO_META_FLUSH="$(DRBD_NO_META_FLUSH)" \ + -DSYSLOG_USAGE="$(SYSLOG_USAGE)" \ +diff --git a/src/AutoConf.hs.in b/src/AutoConf.hs.in +--- a/src/AutoConf.hs.in ++++ b/src/AutoConf.hs.in +@@ -157,6 +157,9 @@ sharedir = "SHAREDIR" + versionedsharedir :: String + versionedsharedir = "VERSIONEDSHAREDIR" + ++pythondir :: String ++pythondir = "PYTHONDIR" ++ + drbdBarriers :: String + drbdBarriers = "DRBD_BARRIERS" + +diff --git a/src/Ganeti/Path.hs b/src/Ganeti/Path.hs +--- a/src/Ganeti/Path.hs ++++ b/src/Ganeti/Path.hs +@@ -188,5 +188,5 @@ getInstReasonFilename instName = instanceReasonDir `pjoin` instName + + -- | The path to the Python executable for starting jobs. + jqueueExecutorPy :: IO FilePath +-jqueueExecutorPy = return $ versionedsharedir +- "ganeti" "jqueue" "exec.py" ++jqueueExecutorPy = return $ pythondir ++ "ganeti" "jqueue" "exec.py" +diff --git a/src/Ganeti/Query/Exec.hs b/src/Ganeti/Query/Exec.hs +--- a/src/Ganeti/Query/Exec.hs ++++ b/src/Ganeti/Query/Exec.hs +@@ -99,12 +99,12 @@ spawnJobProcess jid = withErrorLogAt CRITICAL (show jid) $ + do + use_debug <- isDebugMode + env_ <- (M.toList . M.insert "GNT_DEBUG" (if use_debug then "1" else "0") +- . M.insert "PYTHONPATH" AC.versionedsharedir ++ . M.insert "PYTHONPATH" AC.pythondir + . M.fromList) + `liftM` getEnvironment + execPy <- P.jqueueExecutorPy + logDebug $ "Executing " ++ AC.pythonPath ++ " " ++ execPy +- ++ " with PYTHONPATH=" ++ AC.versionedsharedir ++ ++ " with PYTHONPATH=" ++ AC.pythondir + + (master, child) <- pipeClient connectConfig + let (rh, wh) = clientToHandle child + diff --git a/gnu/packages/patches/ganeti-os-disk-size.patch b/gnu/packages/patches/ganeti-os-disk-size.patch new file mode 100644 index 0000000000..16b1d7615c --- /dev/null +++ b/gnu/packages/patches/ganeti-os-disk-size.patch @@ -0,0 +1,17 @@ +This exposes information about disk sizes to OS install scripts. instance-guix +uses this if available to determine the size of the VM image. + +Submitted upstream: +https://github.com/ganeti/ganeti/pull/1503 + +diff --git a/lib/backend.py b/lib/backend.py +--- a/lib/backend.py ++++ b/lib/backend.py +@@ -4305,6 +4305,7 @@ def OSEnvironment(instance, inst_os, debug=0): + uri = _CalculateDeviceURI(instance, disk, real_disk) + result["DISK_%d_ACCESS" % idx] = disk.mode + result["DISK_%d_UUID" % idx] = disk.uuid ++ result["DISK_%d_SIZE" % idx] = str(disk.size) + if real_disk.dev_path: + result["DISK_%d_PATH" % idx] = real_disk.dev_path + if uri: diff --git a/gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch b/gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch new file mode 100644 index 0000000000..1358e30633 --- /dev/null +++ b/gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch @@ -0,0 +1,21 @@ +Do not override PYTHONPATH when calling Python code from the Haskell +daemons. This is necessary because the Python library dependencies are +only available through PYTHONPATH. + +diff --git a/src/Ganeti/Query/Exec.hs b/src/Ganeti/Query/Exec.hs +--- a/src/Ganeti/Query/Exec.hs ++++ b/src/Ganeti/Query/Exec.hs +@@ -99,12 +99,10 @@ spawnJobProcess jid = withErrorLogAt CRITICAL (show jid) $ + do + use_debug <- isDebugMode + env_ <- (M.toList . M.insert "GNT_DEBUG" (if use_debug then "1" else "0") +- . M.insert "PYTHONPATH" AC.pythondir + . M.fromList) + `liftM` getEnvironment + execPy <- P.jqueueExecutorPy + logDebug $ "Executing " ++ AC.pythonPath ++ " " ++ execPy +- ++ " with PYTHONPATH=" ++ AC.pythondir + + (master, child) <- pipeClient connectConfig + let (rh, wh) = clientToHandle child + diff --git a/gnu/packages/patches/ganeti-shepherd-master-failover.patch b/gnu/packages/patches/ganeti-shepherd-master-failover.patch new file mode 100644 index 0000000000..36a7918998 --- /dev/null +++ b/gnu/packages/patches/ganeti-shepherd-master-failover.patch @@ -0,0 +1,18 @@ +By default, master-failover will call "herd start ganeti-wconfd" with +extra arguments such as --force-node. That does not work with the +Shepherd, so the Guix service has a "force-start" action for this purpose. + +diff --git a/lib/bootstrap.py b/lib/bootstrap.py +--- a/lib/bootstrap.py ++++ b/lib/bootstrap.py +@@ -1011,9 +1011,7 @@ def MasterFailover(no_voting=False): + + try: + # Forcefully start WConfd so that we can access the configuration +- result = utils.RunCmd([pathutils.DAEMON_UTIL, +- "start", constants.WCONFD, "--force-node", +- "--no-voting", "--yes-do-it"]) ++ result = utils.RunCmd(["herd", "force-start", constants.WCONFD]) + if result.failed: + raise errors.OpPrereqError("Could not start the configuration daemon," + " command %s had exitcode %s and error %s" % diff --git a/gnu/packages/patches/ganeti-shepherd-support.patch b/gnu/packages/patches/ganeti-shepherd-support.patch new file mode 100644 index 0000000000..f750604344 --- /dev/null +++ b/gnu/packages/patches/ganeti-shepherd-support.patch @@ -0,0 +1,87 @@ +Ganeti uses an internal tool to start/stop daemons during init and +upgrade. This patch makes the tool use native Shepherd facilities. + +diff --git a/daemons/daemon-util.in b/daemons/daemon-util.in +--- a/daemons/daemon-util.in ++++ b/daemons/daemon-util.in +@@ -184,6 +184,21 @@ use_systemctl() { + return 1 + } + ++# Checks if we should use the Shepherd to start/stop daemons ++use_shepherd() { ++ # Is Shepherd running as PID 1? ++ ps --no-headers -p 1 -o cmd | grep -q shepherd || return 1 ++ ++ type -p herd >/dev/null || return 1 ++ ++ # Does Shepherd know about Ganeti at all? ++ if herd status | grep -q ganeti; then ++ return 0 ++ fi ++ ++ return 1 ++} ++ + # Prints path to PID file for a daemon. + daemon_pidfile() { + if [[ "$#" -lt 1 ]]; then +@@ -261,6 +276,13 @@ check() { + else + return 1 + fi ++ elif use_shepherd; then ++ activestate="$(herd status ${name})" ++ if echo $activestate | grep -q Running ; then ++ return 0 ++ else ++ return 1 ++ fi + elif type -p start-stop-daemon >/dev/null; then + start-stop-daemon --stop --signal 0 --quiet \ + --pidfile $pidfile --name "$name" +@@ -291,6 +313,20 @@ start() { + return $? + fi + ++ if use_shepherd; then ++ if herd status "$name" | grep -q "disabled"; then ++ # The Shepherd will disable a service that has stopped, even if it exits ++ # gracefully. Thus, we must re-enable it in case of a master failover. ++ herd enable "${name}" ++ fi ++ # Note: unlike systemd, which happily starts a service and returns success ++ # even if the daemon immediately exits, the Shepherd actually waits for it ++ # to come up. Thus, ignore the exit status from 'herd start' in case of ++ # master daemons running on the wrong node, or ganeti-kvmd disabled, etc. ++ herd start "${name}" ++ return 0 ++ fi ++ + # Read $_ARGS and $EXTRA__ARGS + eval local args="\"\$${ucname}_ARGS \$EXTRA_${ucname}_ARGS\"" + +@@ -336,6 +372,13 @@ stop() { + + if use_systemctl; then + systemctl stop "${name}.service" ++ elif use_shepherd; then ++ if herd status | grep -q "$name"; then ++ herd stop "$name" ++ else ++ # Do not raise an error if the service has not been enabled. ++ return 0 ++ fi + elif type -p start-stop-daemon >/dev/null; then + start-stop-daemon --stop --quiet --oknodo --retry 30 \ + --pidfile $pidfile --name "$name" +@@ -352,6 +395,9 @@ check_and_start() { + if use_systemctl; then + echo "${name} supervised by systemd but not running, will not restart." + return 1 ++ elif use_shepherd; then ++ echo "${name} supervised by shepherd but not running, will not restart." ++ return 1 + fi + + start $name -- cgit v1.2.3 From ba7a63da4822d53298d64a31e3dd55bc60bad62a Mon Sep 17 00:00:00 2001 From: Diego Nicola Barbato Date: Fri, 17 Jul 2020 01:18:00 +0200 Subject: gnu: emacs-exwm: Fix fullscreen states. * gnu/packages/patches/emacs-exwm-fix-fullscreen-states.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/emacs-xyz.scm (emacs-exwm)[source]: Use it. Signed-off-by: Nicolas Goaziou --- .../patches/emacs-exwm-fix-fullscreen-states.patch | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 gnu/packages/patches/emacs-exwm-fix-fullscreen-states.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/emacs-exwm-fix-fullscreen-states.patch b/gnu/packages/patches/emacs-exwm-fix-fullscreen-states.patch new file mode 100644 index 0000000000..6d31021f67 --- /dev/null +++ b/gnu/packages/patches/emacs-exwm-fix-fullscreen-states.patch @@ -0,0 +1,39 @@ +From edb930005b0ba83051ca8a59b493e9a3c8ef580a Mon Sep 17 00:00:00 2001 +From: Chris Feng +Date: Sun, 14 Jun 2020 00:00:00 +0000 +Subject: [PATCH] Fix fullscreen states + +* exwm-layout.el (exwm-layout-set-fullscreen, +exwm-layout-unset-fullscreen): Use `exwm--id' for interactive use. +(exwm-layout-unset-fullscreen): Mandatorily clear fullscreen states. +--- + exwm-layout.el | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/exwm-layout.el b/exwm-layout.el +index 170c2be..79d0c95 100644 +--- a/exwm-layout.el ++++ b/exwm-layout.el +@@ -205,7 +205,7 @@ + :border-width 0 + :stack-mode xcb:StackMode:Above)) + (cl-pushnew xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state) +- (exwm-layout--set-ewmh-state id) ++ (exwm-layout--set-ewmh-state exwm--id) + (xcb:flush exwm--connection) + (set-window-dedicated-p (get-buffer-window) t) + (exwm-input--release-keyboard exwm--id))) +@@ -233,7 +233,9 @@ + (let ((window (get-buffer-window nil t))) + (when window + (exwm-layout--show exwm--id window)))) +- (exwm-layout--set-ewmh-state id) ++ (setq exwm--ewmh-state ++ (delq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state)) ++ (exwm-layout--set-ewmh-state exwm--id) + (xcb:flush exwm--connection) + (set-window-dedicated-p (get-buffer-window) nil) + (when (eq 'line-mode exwm--selected-input-mode) +-- +2.26.2 + -- cgit v1.2.3 From c3951015d79ce7410fbd66d889acc88be9192d32 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sat, 27 Jun 2020 17:25:52 +0200 Subject: gnu: Add maven-enforcer-api. * gnu/packages/maven.scm (maven-enforcer-api): New variable. * gnu/packages/patches/maven-enforcer-api-fix-old-dependencies.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- .../maven-enforcer-api-fix-old-dependencies.patch | 177 +++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 gnu/packages/patches/maven-enforcer-api-fix-old-dependencies.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/maven-enforcer-api-fix-old-dependencies.patch b/gnu/packages/patches/maven-enforcer-api-fix-old-dependencies.patch new file mode 100644 index 0000000000..98a0c8a395 --- /dev/null +++ b/gnu/packages/patches/maven-enforcer-api-fix-old-dependencies.patch @@ -0,0 +1,177 @@ +From eccc46eaf7903a8e837813795498b12c078faaea Mon Sep 17 00:00:00 2001 +From: Julien Lepiller +Date: Wed, 11 Mar 2020 21:53:32 +0100 +Subject: [PATCH] Fix old dependencies + +--- + .../enforcer/AbstractBanDependencies.java | 2 +- + .../enforcer/BanTransitiveDependencies.java | 2 +- + .../enforcer/DependencyConvergence.java | 17 ++++++++--------- + .../enforcer/RequireUpperBoundDeps.java | 19 +++++++++---------- + .../enforcer/utils/DependencyVersionMap.java | 6 +++--- + 5 files changed, 22 insertions(+), 24 deletions(-) + +diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java +index 2888a61..2b944b7 100644 +--- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java ++++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java +@@ -119,7 +119,7 @@ public abstract class AbstractBanDependencies + Set dependencies = null; + try + { +- DependencyNode node = graphBuilder.buildDependencyGraph( project, null ); ++ DependencyNode node = graphBuilder.buildDependencyGraph( project.getProjectBuildingRequest(), null ); + if ( searchTransitive ) + { + dependencies = ArtifactUtils.getAllDescendants( node ); +diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BanTransitiveDependencies.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BanTransitiveDependencies.java +index 6e1dcd4..1b964ba 100644 +--- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BanTransitiveDependencies.java ++++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BanTransitiveDependencies.java +@@ -158,7 +158,7 @@ public class BanTransitiveDependencies + try + { + MavenProject project = (MavenProject) helper.evaluate( "${project}" ); +- rootNode = createDependencyGraphBuilder().buildDependencyGraph( project, null ); ++ rootNode = createDependencyGraphBuilder().buildDependencyGraph( project.getProjectBuildingRequest(), null ); + } + catch ( Exception e ) + { +diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/DependencyConvergence.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/DependencyConvergence.java +index 684f984..ca7ad3a 100644 +--- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/DependencyConvergence.java ++++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/DependencyConvergence.java +@@ -35,9 +35,9 @@ import org.apache.maven.enforcer.rule.api.EnforcerRuleHelper; + import org.apache.maven.plugin.logging.Log; + import org.apache.maven.plugins.enforcer.utils.DependencyVersionMap; + import org.apache.maven.project.MavenProject; +-import org.apache.maven.shared.dependency.tree.DependencyNode; +-import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder; +-import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException; ++import org.apache.maven.shared.dependency.graph.DependencyNode; ++import org.apache.maven.shared.dependency.graph.DependencyGraphBuilder; ++import org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException; + import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException; + import org.codehaus.plexus.component.repository.exception.ComponentLookupException; + +@@ -60,7 +60,7 @@ public class DependencyConvergence + // CHECKSTYLE_OFF: LineLength + /** + * Uses the {@link EnforcerRuleHelper} to populate the values of the +- * {@link DependencyTreeBuilder#buildDependencyTree(MavenProject, ArtifactRepository, ArtifactFactory, ArtifactMetadataSource, ArtifactFilter, ArtifactCollector)} ++ * {@link DependencyGraphBuilder#buildDependencyTree(MavenProject, ArtifactRepository, ArtifactFactory, ArtifactMetadataSource, ArtifactFilter, ArtifactCollector)} + * factory method.
+ * This method simply exists to hide all the ugly lookup that the {@link EnforcerRuleHelper} has to do. + * +@@ -75,16 +75,15 @@ public class DependencyConvergence + try + { + MavenProject project = (MavenProject) helper.evaluate( "${project}" ); +- DependencyTreeBuilder dependencyTreeBuilder = +- (DependencyTreeBuilder) helper.getComponent( DependencyTreeBuilder.class ); ++ DependencyGraphBuilder dependencyTreeBuilder = ++ (DependencyGraphBuilder) helper.getComponent( DependencyGraphBuilder.class ); + ArtifactRepository repository = (ArtifactRepository) helper.evaluate( "${localRepository}" ); + ArtifactFactory factory = (ArtifactFactory) helper.getComponent( ArtifactFactory.class ); + ArtifactMetadataSource metadataSource = + (ArtifactMetadataSource) helper.getComponent( ArtifactMetadataSource.class ); + ArtifactCollector collector = (ArtifactCollector) helper.getComponent( ArtifactCollector.class ); + ArtifactFilter filter = null; // we need to evaluate all scopes +- DependencyNode node = dependencyTreeBuilder.buildDependencyTree( project, repository, factory, +- metadataSource, filter, collector ); ++ DependencyNode node = dependencyTreeBuilder.buildDependencyGraph( project.getProjectBuildingRequest(), filter); + return node; + } + catch ( ExpressionEvaluationException e ) +@@ -95,7 +94,7 @@ public class DependencyConvergence + { + throw new EnforcerRuleException( "Unable to lookup a component " + e.getLocalizedMessage(), e ); + } +- catch ( DependencyTreeBuilderException e ) ++ catch ( DependencyGraphBuilderException e ) + { + throw new EnforcerRuleException( "Could not build dependency tree " + e.getLocalizedMessage(), e ); + } +diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireUpperBoundDeps.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireUpperBoundDeps.java +index 458554a..2de9870 100644 +--- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireUpperBoundDeps.java ++++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireUpperBoundDeps.java +@@ -38,10 +38,10 @@ import org.apache.maven.enforcer.rule.api.EnforcerRuleException; + import org.apache.maven.enforcer.rule.api.EnforcerRuleHelper; + import org.apache.maven.plugin.logging.Log; + import org.apache.maven.project.MavenProject; +-import org.apache.maven.shared.dependency.tree.DependencyNode; +-import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder; +-import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException; +-import org.apache.maven.shared.dependency.tree.traversal.DependencyNodeVisitor; ++import org.apache.maven.shared.dependency.graph.DependencyNode; ++import org.apache.maven.shared.dependency.graph.DependencyGraphBuilder; ++import org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException; ++import org.apache.maven.shared.dependency.graph.traversal.DependencyNodeVisitor; + import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException; + import org.codehaus.plexus.component.repository.exception.ComponentLookupException; + +@@ -91,7 +91,7 @@ public class RequireUpperBoundDeps + // CHECKSTYLE_OFF: LineLength + /** + * Uses the {@link EnforcerRuleHelper} to populate the values of the +- * {@link DependencyTreeBuilder#buildDependencyTree(MavenProject, ArtifactRepository, ArtifactFactory, ArtifactMetadataSource, ArtifactFilter, ArtifactCollector)} ++ * {@link DependencyGraphBuilder#buildDependencyTree(MavenProject, ArtifactRepository, ArtifactFactory, ArtifactMetadataSource, ArtifactFilter, ArtifactCollector)} + * factory method.
+ * This method simply exists to hide all the ugly lookup that the {@link EnforcerRuleHelper} has to do. + * +@@ -106,8 +106,8 @@ public class RequireUpperBoundDeps + try + { + MavenProject project = (MavenProject) helper.evaluate( "${project}" ); +- DependencyTreeBuilder dependencyTreeBuilder = +- (DependencyTreeBuilder) helper.getComponent( DependencyTreeBuilder.class ); ++ DependencyGraphBuilder dependencyTreeBuilder = ++ (DependencyGraphBuilder) helper.getComponent( DependencyGraphBuilder.class ); + ArtifactRepository repository = (ArtifactRepository) helper.evaluate( "${localRepository}" ); + ArtifactFactory factory = (ArtifactFactory) helper.getComponent( ArtifactFactory.class ); + ArtifactMetadataSource metadataSource = +@@ -115,8 +115,7 @@ public class RequireUpperBoundDeps + ArtifactCollector collector = (ArtifactCollector) helper.getComponent( ArtifactCollector.class ); + ArtifactFilter filter = null; // we need to evaluate all scopes + DependencyNode node = +- dependencyTreeBuilder.buildDependencyTree( project, repository, factory, metadataSource, filter, +- collector ); ++ dependencyTreeBuilder.buildDependencyGraph( project.getProjectBuildingRequest(), filter); + return node; + } + catch ( ExpressionEvaluationException e ) +@@ -127,7 +126,7 @@ public class RequireUpperBoundDeps + { + throw new EnforcerRuleException( "Unable to lookup a component " + e.getLocalizedMessage(), e ); + } +- catch ( DependencyTreeBuilderException e ) ++ catch ( DependencyGraphBuilderException e ) + { + throw new EnforcerRuleException( "Could not build dependency tree " + e.getLocalizedMessage(), e ); + } +diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/DependencyVersionMap.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/DependencyVersionMap.java +index b6213fa..2c2a645 100644 +--- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/DependencyVersionMap.java ++++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/DependencyVersionMap.java +@@ -26,8 +26,8 @@ import java.util.Map; + + import org.apache.maven.artifact.Artifact; + import org.apache.maven.plugin.logging.Log; +-import org.apache.maven.shared.dependency.tree.DependencyNode; +-import org.apache.maven.shared.dependency.tree.traversal.DependencyNodeVisitor; ++import org.apache.maven.shared.dependency.graph.DependencyNode; ++import org.apache.maven.shared.dependency.graph.traversal.DependencyNodeVisitor; + + /** + * @author Brian Fox +@@ -132,4 +132,4 @@ public class DependencyVersionMap + } + return output; + } +-} +\ No newline at end of file ++} +-- +2.24.1 + -- cgit v1.2.3 From 17666c090b6329bf0be3bb068382d9cd4aafab01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= Date: Wed, 15 Jul 2020 22:02:24 +0200 Subject: gnu: Add Rust 1.45. * gnu/packages/rust.scm (rust-1.45): New variable. * gnu/packages/patches/rust-1.45-linker-locale.patch: New file. * gnu/local.mk (dist_patch_DATA): Add the patch to the list. --- gnu/packages/patches/rust-1.45-linker-locale.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 gnu/packages/patches/rust-1.45-linker-locale.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/rust-1.45-linker-locale.patch b/gnu/packages/patches/rust-1.45-linker-locale.patch new file mode 100644 index 0000000000..40220e8e77 --- /dev/null +++ b/gnu/packages/patches/rust-1.45-linker-locale.patch @@ -0,0 +1,14 @@ +Patch will be included upstream in 1.47: https://github.com/rust-lang/rust/pull/74416 +diff --git a/src/librustc_codegen_ssa/back/linker.rs b/src/librustc_codegen_ssa/back/linker.rs +index e64aafa599f..12575ac4358 100644 +--- a/src/librustc_codegen_ssa/back/linker.rs ++++ b/src/librustc_codegen_ssa/back/linker.rs +@@ -28,7 +28,7 @@ use rustc_target::spec::{LinkOutputKind, LinkerFlavor, LldFlavor}; + pub fn disable_localization(linker: &mut Command) { + // No harm in setting both env vars simultaneously. + // Unix-style linkers. +- linker.env("LC_ALL", "C"); ++ linker.env("LC_ALL", "en_US.UTF-8"); + // MSVC's `link.exe`. + linker.env("VSLANG", "1033"); + } -- cgit v1.2.3 From c164c402a1899ffd2b2caba541b51e05855e94b8 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 14 Jul 2020 22:37:13 -0400 Subject: gnu: ruby-rubocop: Update to 0.88.0. * gnu/packages/patches/ruby-rubocop-break-dependency-cycle.patch: New file. * gnu/local.mk (dist_patch_DATA): Register patch. * gnu/packages/ruby.scm (ruby-rubocop): Update to 0.88.0. [origin]: Use git-fetch. Apply the newly added patch. [arguments]: Set #:test-target to "default". Remove #:tests?, enabling tests. [phases]{remove-problematic-tests, disable-bundler, set-home, make-adoc-files-writable}: New phases. Replace the 'replace-git-ls-files phase. [native-inputs]: Add ruby-bump, ruby-pry, ruby-rspec, ruby-test-queue, ruby-webmock-2 and ruby-yard. [propagated-inputs]: Remove ruby-powerpack and ruby-jaro-winkler. Add ruby-regexp-parser, ruby-rexml and ruby-rubocop-ast. --- .../ruby-rubocop-break-dependency-cycle.patch | 101 +++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 gnu/packages/patches/ruby-rubocop-break-dependency-cycle.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/ruby-rubocop-break-dependency-cycle.patch b/gnu/packages/patches/ruby-rubocop-break-dependency-cycle.patch new file mode 100644 index 0000000000..035a98fa33 --- /dev/null +++ b/gnu/packages/patches/ruby-rubocop-break-dependency-cycle.patch @@ -0,0 +1,101 @@ +From ff3f00b7f33332ebf1c3c05abc4a781684775b3c Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer +Date: Tue, 14 Jul 2020 11:50:12 -0400 +Subject: [PATCH] config: Drop rubocop-performance, rubocop-rspec requirements. + +This patch removes Rubocop extensions from Rubocop's closure to break +a dependency cycle with itself. + +* .rubocop.yml: Remove rubocop-performance and rubocop-rspec and their +corresponding directives. +* .rubocop_todo.yml: Likewise. +--- + .rubocop.yml | 15 --------------- + .rubocop_todo.yml | 44 -------------------------------------------- + 2 files changed, 59 deletions(-) + +diff --git a/.rubocop.yml b/.rubocop.yml +index 4f05d5be2..f12ef7c06 100644 +--- a/.rubocop.yml ++++ b/.rubocop.yml +@@ -3,8 +3,6 @@ + inherit_from: .rubocop_todo.yml + require: + - rubocop/cop/internal_affairs +- - rubocop-performance +- - rubocop-rspec + + AllCops: + NewCops: enable +@@ -106,16 +104,3 @@ Metrics/ClassLength: + Metrics/ModuleLength: + Exclude: + - 'spec/**/*.rb' +- +-RSpec/FilePath: +- Exclude: +- - spec/rubocop/formatter/junit_formatter_spec.rb +- +-RSpec/PredicateMatcher: +- EnforcedStyle: explicit +- +-RSpec/MessageSpies: +- EnforcedStyle: receive +- +-RSpec/NestedGroups: +- Max: 7 +diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml +index 3f72042d1..fa637cd42 100644 +--- a/.rubocop_todo.yml ++++ b/.rubocop_todo.yml +@@ -24,47 +24,3 @@ Metrics/MethodLength: + # Configuration parameters: CountComments. + Metrics/ModuleLength: + Max: 132 +- +-# Offense count: 10 +-RSpec/AnyInstance: +- Exclude: +- - 'spec/rubocop/cli_spec.rb' +- - 'spec/rubocop/cop/lint/duplicate_methods_spec.rb' +- - 'spec/rubocop/cop/team_spec.rb' +- - 'spec/rubocop/target_finder_spec.rb' +- +-# Offense count: 981 +-# Configuration parameters: Prefixes. +-# Prefixes: when, with, without +-RSpec/ContextWording: +- Enabled: false +- +-# Offense count: 3810 +-# Configuration parameters: Max. +-RSpec/ExampleLength: +- Enabled: false +- +-# Offense count: 38 +-RSpec/ExpectOutput: +- Exclude: +- - 'spec/rubocop/cli/cli_auto_gen_config_spec.rb' +- - 'spec/rubocop/cli/cli_options_spec.rb' +- - 'spec/rubocop/config_spec.rb' +- - 'spec/rubocop/cop/cop_spec.rb' +- - 'spec/rubocop/formatter/disabled_config_formatter_spec.rb' +- - 'spec/rubocop/formatter/formatter_set_spec.rb' +- - 'spec/rubocop/options_spec.rb' +- - 'spec/rubocop/rake_task_spec.rb' +- - 'spec/rubocop/result_cache_spec.rb' +- - 'spec/rubocop/target_finder_spec.rb' +- +-# Offense count: 434 +-RSpec/MultipleExpectations: +- Max: 25 +- +-# Offense count: 5 +-RSpec/SubjectStub: +- Exclude: +- - 'spec/rubocop/config_spec.rb' +- - 'spec/rubocop/formatter/json_formatter_spec.rb' +- - 'spec/rubocop/formatter/progress_formatter_spec.rb' +-- +2.27.0 + -- cgit v1.2.3 From c91c132fc42c6e67140b393b963d7ced009f093e Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 19 Jul 2020 08:59:48 +0200 Subject: gnu: ungoogled-chromium: Update to 84.0.4147.89-0.df199c0. * gnu/packages/patches/ungoogled-chromium-system-jsoncpp.patch, gnu/packages/patches/ungoogled-chromium-system-zlib.patch: Delete files. * gnu/packages/patches/ungoogled-chromium-system-nspr.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/chromium.scm (%preserved-third-party-files): Adjust for 84. (%ungoogled-revision): Set to df199c04ff367da59ce52a23a3f3b305dd3b00c3. (%debian-revision): Set to debian/83.0.4103.116-3. (%gentoo-revision): Set to f3f649046d31ebdbc8c4a302b2384504eff78027. (chromium-gcc-patchset, %chromium-gcc-patches): New variables. (%gentoo-patches): Remove GCC patches, which have been moved to the above repo. Add ffmpeg compatibility patch. (%debian-patches): Add zlib and jsoncpp patch; remove nspr patch. (%ungoogled-origin): Update hash. (ungoogled-chromium-snippet): Add the new GCC patches. Remove obsolete local patches, add new. (xcb-proto/python2): New variable. (ungoogled-chromium): Update to 84.0.4147.89-0..df199c0. [arguments]: Add "is_unsafe_developer_build", "max_jobs_per_link", "exclude_unwind_tables", "xcbproto_path", "perfetto_use_system_protobuf" to #:configure-flags. Remove "linux_use_bundled_binutils". Adjust vulkan header substitutions. [native-inputs]: Remove YASM. [inputs]: Change from FFMPEG-4.2 to FFMPEG. Add PROTOBUF and XCB-PROTO/PYTHON2. --- .../ungoogled-chromium-system-jsoncpp.patch | 65 ----------- .../patches/ungoogled-chromium-system-nspr.patch | 120 +++++++++++++++++++++ .../patches/ungoogled-chromium-system-zlib.patch | 47 -------- 3 files changed, 120 insertions(+), 112 deletions(-) delete mode 100644 gnu/packages/patches/ungoogled-chromium-system-jsoncpp.patch create mode 100644 gnu/packages/patches/ungoogled-chromium-system-nspr.patch delete mode 100644 gnu/packages/patches/ungoogled-chromium-system-zlib.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/ungoogled-chromium-system-jsoncpp.patch b/gnu/packages/patches/ungoogled-chromium-system-jsoncpp.patch deleted file mode 100644 index 294e1ea33b..0000000000 --- a/gnu/packages/patches/ungoogled-chromium-system-jsoncpp.patch +++ /dev/null @@ -1,65 +0,0 @@ -Build with the system jsoncpp instead of the bundled one. - -Adapted from Debian: -https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/system/jsoncpp.patch - -diff --git a/third_party/jsoncpp/BUILD.gn b/third_party/jsoncpp/BUILD.gn ---- a/third_party/jsoncpp/BUILD.gn -+++ b/third_party/jsoncpp/BUILD.gn -@@ -3,52 +3,14 @@ - # found in the LICENSE file. - - import("//testing/libfuzzer/fuzzer_test.gni") -+import("//build/config/linux/pkg_config.gni") - --config("jsoncpp_config") { -- include_dirs = [ -- "source/include", -- "generated", -- ] -- -- # TODO(crbug.com/983223): Update JsonCpp BUILD.gn to remove deprecated -- # declaration flag. -- # This temporary flag allowing clients to update to the new version, and then -- # update to the new StreamWriter and CharReader classes. -- if (!is_win || is_clang) { -- cflags_cc = [ "-Wno-deprecated-declarations" ] -- } -+pkg_config("jsoncpp_config") { -+ packages = [ "jsoncpp" ] - } - --source_set("jsoncpp") { -- sources = [ -- "generated/version.h", -- "source/include/json/assertions.h", -- "source/include/json/autolink.h", -- "source/include/json/config.h", -- "source/include/json/features.h", -- "source/include/json/forwards.h", -- "source/include/json/json.h", -- "source/include/json/reader.h", -- "source/include/json/value.h", -- "source/include/json/writer.h", -- "source/src/lib_json/json_reader.cpp", -- "source/src/lib_json/json_tool.h", -- "source/src/lib_json/json_value.cpp", -- "source/src/lib_json/json_writer.cpp", -- ] -- -+group("jsoncpp") { - public_configs = [ ":jsoncpp_config" ] -- -- defines = [ -- "JSON_USE_EXCEPTION=0", -- "JSON_USE_NULLREF=0", -- ] -- -- include_dirs = [ "source/src/lib_json" ] -- -- if (!is_win || is_clang) { -- cflags_cc = [ "-Wno-implicit-fallthrough" ] -- } - } - - if (build_with_chromium) { diff --git a/gnu/packages/patches/ungoogled-chromium-system-nspr.patch b/gnu/packages/patches/ungoogled-chromium-system-nspr.patch new file mode 100644 index 0000000000..6fbc0a56a7 --- /dev/null +++ b/gnu/packages/patches/ungoogled-chromium-system-nspr.patch @@ -0,0 +1,120 @@ +Build with the system nspr library. + +Originally based on a Debian patch: +https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/system/nspr.patch + +--- a/base/time/pr_time_unittest.cc ++++ b/base/time/pr_time_unittest.cc +@@ -7,7 +7,7 @@ + + #include "base/compiler_specific.h" + #include "base/stl_util.h" +-#include "base/third_party/nspr/prtime.h" ++#include + #include "base/time/time.h" + #include "build/build_config.h" + #include "testing/gtest/include/gtest/gtest.h" +--- a/base/time/time.cc ++++ b/base/time/time.cc +@@ -14,7 +14,7 @@ + #include "base/macros.h" + #include "base/no_destructor.h" + #include "base/strings/stringprintf.h" +-#include "base/third_party/nspr/prtime.h" ++#include + #include "base/time/time_override.h" + #include "build/build_config.h" + +--- a/base/BUILD.gn ++++ b/base/BUILD.gn +@@ -107,6 +107,9 @@ config("base_flags") { + "-Wglobal-constructors", + ] + } ++ ldflags = [ ++ "-lnspr4", ++ ] + } + + config("base_implementation") { +@@ -712,8 +715,6 @@ jumbo_component("base") { + "third_party/cityhash_v103/src/city_v103.h", + "third_party/icu/icu_utf.cc", + "third_party/icu/icu_utf.h", +- "third_party/nspr/prtime.cc", +- "third_party/nspr/prtime.h", + "third_party/superfasthash/superfasthash.c", + "thread_annotations.h", + "threading/hang_watcher.cc", +--- a/tools/gn/build/gen.py ++++ b/tools/gn/build/gen.py +@@ -339,6 +339,9 @@ def WriteGNNinja(path, platform, host, o + if not options.no_static_libstdcpp: + ldflags.append('-static-libstdc++') + ++ # Additional system libraries that are used. ++ libs.append('-lnspr4') ++ + # This is needed by libc++. + if not platform.is_mingw(): + libs.append('-ldl') +--- a/third_party/blink/renderer/platform/BUILD.gn ++++ b/third_party/blink/renderer/platform/BUILD.gn +@@ -103,6 +103,9 @@ + "//build/win:default_exe_manifest", + "//third_party/icu", + ] ++ ldflags = [ ++ "-lnspr4" ++ ] + } + + # This isn't strictly necessary since we can just add the deps to "platform", +--- a/third_party/crashpad/crashpad/handler/BUILD.gn ++++ b/third_party/crashpad/crashpad/handler/BUILD.gn +@@ -140,6 +140,9 @@ + "../third_party/mini_chromium:base", + "../tools:tool_support", + ] ++ ldflags = [ ++ "-lnspr4" ++ ] + + if (crashpad_is_win) { + if (crashpad_is_in_chromium || crashpad_is_in_dart) { +--- a/chrome/common/search/BUILD.gn ++++ b/chrome/common/search/BUILD.gn +@@ -20,6 +20,9 @@ + "//chrome/common/themes:autogenerated_theme_util", + "//skia", + ] ++ ldflags = [ ++ "-lnspr4" ++ ] + } + + compiled_action("generate_chrome_colors_info") { +--- a/components/url_formatter/spoof_checks/top_domains/BUILD.gn ++++ b/components/url_formatter/spoof_checks/top_domains/BUILD.gn +@@ -31,6 +31,9 @@ + "//net/tools/huffman_trie:huffman_trie_generator_sources", + "//url:url", + ] ++ ldflags = [ ++ "-lnspr4", ++ ] + if (is_ios) { + libs = [ "UIKit.framework" ] + } +--- a/components/schema_org/BUILD.gn ++++ b/components/schema_org/BUILD.gn +@@ -33,6 +33,9 @@ + "//base", + "//url", + ] ++ ldflags = [ ++ "-lnspr4", ++ ] + } + + compiled_action("schema_org_name_data") { diff --git a/gnu/packages/patches/ungoogled-chromium-system-zlib.patch b/gnu/packages/patches/ungoogled-chromium-system-zlib.patch deleted file mode 100644 index b6e3c0f075..0000000000 --- a/gnu/packages/patches/ungoogled-chromium-system-zlib.patch +++ /dev/null @@ -1,47 +0,0 @@ -Use zlib instead of the bundled lzma_sdk. - -Adapted from Debian: -https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/system/zlib.patch - -diff --git a/courgette/BUILD.gn b/courgette/BUILD.gn ---- a/courgette/BUILD.gn -+++ b/courgette/BUILD.gn -@@ -58,7 +58,6 @@ static_library("courgette_lib") { - - deps = [ - "//base", -- "//third_party/lzma_sdk", - ] - - public_deps = [ -@@ -79,7 +78,6 @@ source_set("courgette_common") { - ] - deps = [ - "//base", -- "//third_party/lzma_sdk", - ] - } - -diff --git a/courgette/crc.cc b/courgette/crc.cc ---- a/courgette/crc.cc -+++ b/courgette/crc.cc -@@ -7,6 +7,8 @@ - #include - #include - -+#define COURGETTE_USE_CRC_LIB -+ - #ifdef COURGETTE_USE_CRC_LIB - # include "zlib.h" - #else -diff --git a/third_party/perfetto/gn/BUILD.gn b/third_party/perfetto/gn/BUILD.gn ---- a/third_party/perfetto/gn/BUILD.gn -+++ b/third_party/perfetto/gn/BUILD.gn -@@ -304,7 +304,6 @@ if (enable_perfetto_zlib) { - public_configs = [ "//buildtools:zlib_config" ] - public_deps = [ "//buildtools:zlib" ] - } else { -- public_configs = [ "//third_party/zlib:zlib_config" ] - public_deps = [ "//third_party/zlib" ] - } - } -- cgit v1.2.3 From 64066abdb026755062b747f3d5b0ebe0efae7fc7 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Mon, 13 Jul 2020 17:25:00 +0200 Subject: gnu: python-aionotify: Fix test cases with Python 3.8. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python-xyz.scm (patches): Add fix. * gnu/packages/patches/python-aionotify-0.2.0-py3.8.patch: New file. * gnu/local.mk: Add it. Signed-off-by: Ludovic Courtès --- .../patches/python-aionotify-0.2.0-py3.8.patch | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 gnu/packages/patches/python-aionotify-0.2.0-py3.8.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/python-aionotify-0.2.0-py3.8.patch b/gnu/packages/patches/python-aionotify-0.2.0-py3.8.patch new file mode 100644 index 0000000000..ebeef34720 --- /dev/null +++ b/gnu/packages/patches/python-aionotify-0.2.0-py3.8.patch @@ -0,0 +1,48 @@ +Compatibility with Python 3.8, see upstream issue +https://github.com/rbarrois/aionotify/pull/15 + +diff --git a/setup.py b/setup.py +index 21a554f..094de64 100755 +--- a/setup.py ++++ b/setup.py +@@ -40,7 +40,7 @@ setup( + setup_requires=[ + ], + tests_require=[ +- 'asynctest', ++ 'asynctest; python_version<"3.8"', + ], + classifiers=[ + "Development Status :: 4 - Beta", +diff --git a/tests/test_usage.py b/tests/test_usage.py +index f156291..0476ff1 100644 +--- a/tests/test_usage.py ++++ b/tests/test_usage.py +@@ -8,7 +8,11 @@ import os.path + import tempfile + import unittest + +-import asynctest ++try: ++ testBase = unittest.IsolatedAsyncioTestCase ++except AttributeError: ++ import asynctest ++ testBase = asynctest.TestCase + + import aionotify + +@@ -25,11 +29,13 @@ if AIODEBUG: + TESTDIR = os.environ.get('AIOTESTDIR') or os.path.join(os.path.dirname(__file__), 'testevents') + + +-class AIONotifyTestCase(asynctest.TestCase): ++class AIONotifyTestCase(testBase): + forbid_get_event_loop = True + timeout = 3 + + def setUp(self): ++ if not getattr (self, 'loop', None): ++ self.loop = asyncio.get_event_loop() + if AIODEBUG: + self.loop.set_debug(True) + self.watcher = aionotify.Watcher() -- cgit v1.2.3 From d4b02a6fba7c364ab7c8d257cf9a32134e71ce3e Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Tue, 21 Jul 2020 12:51:04 -0500 Subject: gnu: emacs-telega: Patch to use telega-server from Guix. * gnu/packages/patches/emacs-telega-patch-server-functions.patch: New file. * gnu/local.mk (dist_patch_DATA): Reference new patch. * gnu/packages/emacs-xyz.scm (emacs-telega)[source]: Use new patch, bump revision. --- .../emacs-telega-patch-server-functions.patch | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 gnu/packages/patches/emacs-telega-patch-server-functions.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/emacs-telega-patch-server-functions.patch b/gnu/packages/patches/emacs-telega-patch-server-functions.patch new file mode 100644 index 0000000000..e3d49278d0 --- /dev/null +++ b/gnu/packages/patches/emacs-telega-patch-server-functions.patch @@ -0,0 +1,31 @@ +Remove interactive build for telega-server, as it fails on Guix. +Modify the `telega-server--find-bin' function to only use the version +of telega-server installed by Guix. + +Created by Brett Gilio + +--- a/telega-server.el ++++ b/telega-server.el +@@ -113,7 +113,6 @@ If already deferring, then just executes the BODY." + If BUILD-FLAGS is specified, then rebuild server without any + queries using this flags for building, could be empty string. + Otherwise query user about building flags." +- (interactive) + (telega-test-env 'quiet) + (when (or build-flags + (y-or-n-p "Build `telega-server'? ")) +@@ -137,11 +136,8 @@ Otherwise query user about building flags." + (defun telega-server--find-bin () + "Find telega-server executable. + Raise error if not found." +- (let ((exec-path (cons telega-directory exec-path))) +- (or (executable-find "telega-server") +- (progn (telega-server-build) +- (executable-find "telega-server")) +- (error "`telega-server' not found in exec-path")))) ++ (or (executable-find "telega-server") ++ (error "`telega-server' not found in exec-path"))) + + (defun telega-server-version () + "Return telega-server version." + -- cgit v1.2.3 From 2195ad6bd7df591c1f24b5717203b363bc3e1bfd Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 21 Jul 2020 22:18:50 +0200 Subject: gnu: libvnc: Update to 0.9.13. * gnu/packages/patches/libvnc-CVE-2018-20750.patch, gnu/packages/patches/libvnc-CVE-2019-15681.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/vnc.scm (libvnc): Update to 0.9.13. [source](patches): Remove. [arguments]: Add phase to patch 'cc' invocation. --- gnu/packages/patches/libvnc-CVE-2018-20750.patch | 44 ------------------------ gnu/packages/patches/libvnc-CVE-2019-15681.patch | 23 ------------- 2 files changed, 67 deletions(-) delete mode 100644 gnu/packages/patches/libvnc-CVE-2018-20750.patch delete mode 100644 gnu/packages/patches/libvnc-CVE-2019-15681.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/libvnc-CVE-2018-20750.patch b/gnu/packages/patches/libvnc-CVE-2018-20750.patch deleted file mode 100644 index 146243670a..0000000000 --- a/gnu/packages/patches/libvnc-CVE-2018-20750.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 09e8fc02f59f16e2583b34fe1a270c238bd9ffec Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Mon, 7 Jan 2019 10:40:01 +0100 -Subject: [PATCH] Limit lenght to INT_MAX bytes in - rfbProcessFileTransferReadBuffer() - -This ammends 15bb719c03cc70f14c36a843dcb16ed69b405707 fix for a heap -out-of-bound write access in rfbProcessFileTransferReadBuffer() when -reading a transfered file content in a server. The former fix did not -work on platforms with a 32-bit int type (expected by rfbReadExact()). - -CVE-2018-15127 - - ---- - libvncserver/rfbserver.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c -index 7af84906..f2edbeea 100644 ---- a/libvncserver/rfbserver.c -+++ b/libvncserver/rfbserver.c -@@ -88,6 +88,8 @@ - #include - /* strftime() */ - #include -+/* INT_MAX */ -+#include - - #ifdef LIBVNCSERVER_WITH_WEBSOCKETS - #include "rfbssl.h" -@@ -1472,8 +1474,11 @@ char *rfbProcessFileTransferReadBuffer(rfbClientPtr cl, uint32_t length) - 0XFFFFFFFF, i.e. SIZE_MAX for 32-bit systems. On 64-bit systems, a length of 0XFFFFFFFF - will safely be allocated since this check will never trigger and malloc() can digest length+1 - without problems as length is a uint32_t. -+ We also later pass length to rfbReadExact() that expects a signed int type and -+ that might wrap on platforms with a 32-bit int type if length is bigger -+ than 0X7FFFFFFF. - */ -- if(length == SIZE_MAX) { -+ if(length == SIZE_MAX || length > INT_MAX) { - rfbErr("rfbProcessFileTransferReadBuffer: too big file transfer length requested: %u", (unsigned int)length); - rfbCloseClient(cl); - return NULL; diff --git a/gnu/packages/patches/libvnc-CVE-2019-15681.patch b/gnu/packages/patches/libvnc-CVE-2019-15681.patch deleted file mode 100644 index e328d87920..0000000000 --- a/gnu/packages/patches/libvnc-CVE-2019-15681.patch +++ /dev/null @@ -1,23 +0,0 @@ -From d01e1bb4246323ba6fcee3b82ef1faa9b1dac82a Mon Sep 17 00:00:00 2001 -From: Christian Beier -Date: Mon, 19 Aug 2019 22:32:25 +0200 -Subject: [PATCH] rfbserver: don't leak stack memory to the remote - -Thanks go to Pavel Cheremushkin of Kaspersky for reporting. ---- - libvncserver/rfbserver.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c -index 3bacc891..310e5487 100644 ---- a/libvncserver/rfbserver.c -+++ b/libvncserver/rfbserver.c -@@ -3724,6 +3724,8 @@ rfbSendServerCutText(rfbScreenInfoPtr rfbScreen,char *str, int len) - rfbServerCutTextMsg sct; - rfbClientIteratorPtr iterator; - -+ memset((char *)&sct, 0, sizeof(sct)); -+ - iterator = rfbGetClientIterator(rfbScreen); - while ((cl = rfbClientIteratorNext(iterator)) != NULL) { - sct.type = rfbServerCutText; -- cgit v1.2.3 From f3130c6674bb3941be6001bdcbca9f33bb2677e8 Mon Sep 17 00:00:00 2001 From: "B. Wilson" Date: Thu, 28 May 2020 07:32:28 +0900 Subject: gnu: Add intel-xed. * gnu/packages/assembly.scm (intel-xed): New variable. * gnu/packages/patches/intel-xed-fix-nondeterminism.patch: New file. * gnu/local.mk (dist_patch_DATA): Add reference to new patch. Signed-off-by: Marius Bakke --- .../patches/intel-xed-fix-nondeterminism.patch | 113 +++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 gnu/packages/patches/intel-xed-fix-nondeterminism.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/intel-xed-fix-nondeterminism.patch b/gnu/packages/patches/intel-xed-fix-nondeterminism.patch new file mode 100644 index 0000000000..c81bd0edde --- /dev/null +++ b/gnu/packages/patches/intel-xed-fix-nondeterminism.patch @@ -0,0 +1,113 @@ +This patch removes sources of build non-determinism in the upstream sources. + +In particular, many of the compiled sources are generated with Python code, +which in turn uses dictionaries to index the output C functions. However, +iterators over Python dictionaries have no guaranteed order, thus resulting in +the C functions being output in a random order between builds. + +The patch below fixes this by forcing an order during output in several key +places. Note, however, that future updates may uncover new such places that +just happen to be non-problematic at the time of this patch. If you are +reading this due to finding such issues, feel free to contact me at +elaexuotee@wilsonb.com for help. + +diff --git a/pysrc/ild_codegen.py b/pysrc/ild_codegen.py +index 628ec45..a9bff79 100755 +--- a/pysrc/ild_codegen.py ++++ b/pysrc/ild_codegen.py +@@ -188,14 +188,14 @@ def gen_l2_func_list(agi, target_nt_dict, arg_nt_dict, + ild_t_member): + """generate L2 functions""" + l2_func_list = [] +- for (nt_name,array) in target_nt_dict.items(): ++ for (nt_name,array) in sorted(target_nt_dict.items()): + target_opname = array.get_target_opname() + if array.is_const_lookup_fun(): + fo = gen_const_l2_function(agi, nt_name, + target_opname, ild_t_member) + l2_func_list.append(fo) + else: +- for arg_nt_seq,arg_arr in arg_nt_dict.items(): ++ for arg_nt_seq,arg_arr in sorted(arg_nt_dict.items()): + fo = gen_scalable_l2_function(agi, nt_name, + target_opname, ild_t_member, arg_arr, list(arg_nt_seq)) + l2_func_list.append(fo) +diff --git a/pysrc/ild_disp.py b/pysrc/ild_disp.py +index 942c036..cf80e29 100755 +--- a/pysrc/ild_disp.py ++++ b/pysrc/ild_disp.py +@@ -350,7 +350,8 @@ def work(agi, united_lookup, disp_nts, brdisp_nts, ild_gendir, + disp_dict = _gen_l3_array_dict(agi, disp_nts, _disp_token) + + +- nt_arr_list = list(brdisp_dict.values()) + list(disp_dict.values()) ++ nt_arr_list = ([v for (k,v) in sorted(brdisp_dict.items())] + ++ [v for (k,v) in sorted(disp_dict.items())]) + #create function that calls all initialization functions + init_f = ild_nt.gen_init_function(nt_arr_list, 'xed_ild_disp_l3_init') + +@@ -367,7 +368,7 @@ def work(agi, united_lookup, disp_nts, brdisp_nts, ild_gendir, + l2_functions = [] + eosz_op = ild_eosz.get_target_opname() + easz_op = ild_easz.get_target_opname() +- for nt_name,array in list(disp_dict.items()) + list(brdisp_dict.items()): ++ for nt_name,array in sorted(disp_dict.items()) + sorted(brdisp_dict.items()): + #Some DISP NTs depend on EOSZ, others on EASZ, we need to know + #that when we generate L2 functions + if eosz_op in array.get_arg_names(): +diff --git a/pysrc/ild_easz.py b/pysrc/ild_easz.py +index 02cd691..c53b9f2 100755 +--- a/pysrc/ild_easz.py ++++ b/pysrc/ild_easz.py +@@ -165,9 +165,10 @@ def work(agi, united_lookup, easz_nts, ild_gendir, debug): + return + nt_seq_arrays[tuple(nt_seq)] = array + #init function calls all single init functions for the created tables +- init_f = ild_nt.gen_init_function(list(nt_seq_arrays.values()), ++ nt_seq_values = [v for (k,v) in sorted(nt_seq_arrays.items())] ++ init_f = ild_nt.gen_init_function(nt_seq_values, + 'xed_ild_easz_init') +- ild_nt.dump_lu_arrays(agi, list(nt_seq_arrays.values()), _easz_c_fn, ++ ild_nt.dump_lu_arrays(agi, nt_seq_values, _easz_c_fn, + mbuild.join('include-private', _easz_header_fn), + init_f) + getter_fos = [] +diff --git a/pysrc/ild_eosz.py b/pysrc/ild_eosz.py +index 6643bc3..89d2d89 100755 +--- a/pysrc/ild_eosz.py ++++ b/pysrc/ild_eosz.py +@@ -200,10 +200,11 @@ def work(agi, united_lookup, eosz_nts, ild_gendir, debug): + return None + nt_seq_arrays[tuple(nt_seq)] = array + #init function calls all single init functions for the created tables +- init_f = ild_nt.gen_init_function(list(nt_seq_arrays.values()), ++ nt_seq_values = [v for (k,v) in sorted(nt_seq_arrays.items())] ++ init_f = ild_nt.gen_init_function(nt_seq_values, + 'xed_ild_eosz_init') + #dump init and lookup functions for EOSZ sequences +- ild_nt.dump_lu_arrays(agi, list(nt_seq_arrays.values()), _eosz_c_fn, ++ ild_nt.dump_lu_arrays(agi, nt_seq_values, _eosz_c_fn, + mbuild.join('include-private', _eosz_header_fn), + init_f) + #generate EOSZ getter functions - they get xed_decoded_inst_t* +diff --git a/pysrc/ild_imm.py b/pysrc/ild_imm.py +index 51c413c..0530bae 100755 +--- a/pysrc/ild_imm.py ++++ b/pysrc/ild_imm.py +@@ -322,12 +322,14 @@ def work(agi, united_lookup, imm_nts, ild_gendir, eosz_dict, + level='l3') + nt_dict[nt_name] = array + ++ nt_dict_values = [v for (k,v) in sorted(nt_dict.items())] ++ + #create function that calls all initialization functions for L3 +- init_f = ild_nt.gen_init_function(list(nt_dict.values()), ++ init_f = ild_nt.gen_init_function(nt_dict_values, + 'xed_ild_imm_l3_init') + + #dump L3 functions +- ild_nt.dump_lu_arrays(agi, list(nt_dict.values()), _l3_c_fn, ++ ild_nt.dump_lu_arrays(agi, nt_dict_values, _l3_c_fn, + mbuild.join('include-private',_l3_header_fn), + init_f) + -- cgit v1.2.3 From 7dcf5296730ea5d675397b79900899cf515245a8 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Wed, 22 Jul 2020 12:20:24 +0200 Subject: arb: Update to 2.18.1. * gnu/packages/patches/arb-flint-2.6.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/algebra.scm (arb): Update to 2.18.1. [source](patches): Remove. --- gnu/packages/patches/arb-flint-2.6.patch | 48 -------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 gnu/packages/patches/arb-flint-2.6.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/arb-flint-2.6.patch b/gnu/packages/patches/arb-flint-2.6.patch deleted file mode 100644 index 98ff5e95b4..0000000000 --- a/gnu/packages/patches/arb-flint-2.6.patch +++ /dev/null @@ -1,48 +0,0 @@ -From d3d9983231e0f034e86a1e75761627eb8213b704 Mon Sep 17 00:00:00 2001 -From: fredrik -Date: Wed, 29 Apr 2020 13:41:36 +0200 -Subject: [PATCH] handle flint incompatibilities - ---- - fmpr.h | 4 ++++ - fmpz_extras.h | 4 ++++ - 2 files changed, 8 insertions(+) - -diff --git a/fmpr.h b/fmpr.h -index 2204d72e..c6a8c342 100644 ---- a/fmpr.h -+++ b/fmpr.h -@@ -22,7 +22,11 @@ - #include "flint/flint.h" - #include "flint/fmpz.h" - #include "flint/fmpq.h" -+#if __FLINT_RELEASE < 20600 - #include "flint/config.h" -+#else -+#include "flint/flint-config.h" -+#endif - #include "fmpz_extras.h" - - #ifndef flint_abort -diff --git a/fmpz_extras.h b/fmpz_extras.h -index 4fd0538f..486e28c8 100644 ---- a/fmpz_extras.h -+++ b/fmpz_extras.h -@@ -43,6 +43,8 @@ fmpz_add_inline(fmpz_t z, const fmpz_t x, const fmpz_t y) - fmpz_add(z, x, y); - } - -+#if __FLINT_RELEASE < 20600 -+ - static __inline__ void - fmpz_add_si(fmpz_t z, const fmpz_t x, slong y) - { -@@ -61,6 +63,8 @@ fmpz_sub_si(fmpz_t z, const fmpz_t x, slong y) - fmpz_add_ui(z, x, -y); - } - -+#endif -+ - static __inline__ void - fmpz_add_si_inline(fmpz_t z, const fmpz_t x, slong y) - { -- cgit v1.2.3 From ceaeae8f066998026b43557f58994f7711e299a4 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 23 Jul 2020 00:23:50 -0400 Subject: gnu: linux-libre@4.14: Update to 4.14.189. * gnu/packages/linux.scm (linux-libre-4.14-version): Update to 4.14.189. (linux-libre-4.14-pristine-source): Update hash. (linux-libre-4.14-source): Remove %linux-libre-fix-atheros-9271-patch. (deblob-scripts-4.14): Update to 4.14.189. (%linux-libre-fix-atheros-9271-patch): Delete variable. * gnu/packages/patches/linux-libre-fix-atheros-9271.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- .../patches/linux-libre-fix-atheros-9271.patch | 225 --------------------- 1 file changed, 225 deletions(-) delete mode 100644 gnu/packages/patches/linux-libre-fix-atheros-9271.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/linux-libre-fix-atheros-9271.patch b/gnu/packages/patches/linux-libre-fix-atheros-9271.patch deleted file mode 100644 index 7527f9fdf0..0000000000 --- a/gnu/packages/patches/linux-libre-fix-atheros-9271.patch +++ /dev/null @@ -1,225 +0,0 @@ -Revert the following upstream commit, which broke Atheros 9271 support. -See: - https://bugzilla.kernel.org/show_bug.cgi?id=208251 - https://bugzilla.redhat.com/show_bug.cgi?id=1848631 - - -From b5c8896bc14f54e5c4dd5a6e42879f125b8abd2d Mon Sep 17 00:00:00 2001 -From: Qiujun Huang -Date: Sat, 4 Apr 2020 12:18:38 +0800 -Subject: ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb - -commit 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 upstream. - -In ath9k_hif_usb_rx_cb interface number is assumed to be 0. -usb_ifnum_to_if(urb->dev, 0) -But it isn't always true. - -The case reported by syzbot: -https://lore.kernel.org/linux-usb/000000000000666c9c05a1c05d12@google.com -usb 2-1: new high-speed USB device number 2 using dummy_hcd -usb 2-1: config 1 has an invalid interface number: 2 but max is 0 -usb 2-1: config 1 has no interface number 0 -usb 2-1: New USB device found, idVendor=0cf3, idProduct=9271, bcdDevice= -1.08 -usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 -general protection fault, probably for non-canonical address -0xdffffc0000000015: 0000 [#1] SMP KASAN -KASAN: null-ptr-deref in range [0x00000000000000a8-0x00000000000000af] -CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.6.0-rc5-syzkaller #0 - -Call Trace -__usb_hcd_giveback_urb+0x29a/0x550 drivers/usb/core/hcd.c:1650 -usb_hcd_giveback_urb+0x368/0x420 drivers/usb/core/hcd.c:1716 -dummy_timer+0x1258/0x32ae drivers/usb/gadget/udc/dummy_hcd.c:1966 -call_timer_fn+0x195/0x6f0 kernel/time/timer.c:1404 -expire_timers kernel/time/timer.c:1449 [inline] -__run_timers kernel/time/timer.c:1773 [inline] -__run_timers kernel/time/timer.c:1740 [inline] -run_timer_softirq+0x5f9/0x1500 kernel/time/timer.c:1786 -__do_softirq+0x21e/0x950 kernel/softirq.c:292 -invoke_softirq kernel/softirq.c:373 [inline] -irq_exit+0x178/0x1a0 kernel/softirq.c:413 -exiting_irq arch/x86/include/asm/apic.h:546 [inline] -smp_apic_timer_interrupt+0x141/0x540 arch/x86/kernel/apic/apic.c:1146 -apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 - -Reported-and-tested-by: syzbot+40d5d2e8a4680952f042@syzkaller.appspotmail.com -Signed-off-by: Qiujun Huang -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/20200404041838.10426-6-hqjagain@gmail.com -Signed-off-by: Greg Kroah-Hartman ---- - drivers/net/wireless/ath/ath9k/hif_usb.c | 48 ++++++++++++++++++++++++-------- - drivers/net/wireless/ath/ath9k/hif_usb.h | 5 ++++ - 2 files changed, 42 insertions(+), 11 deletions(-) - -diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c -index 6049d3766c64..4ed21dad6a8e 100644 ---- b/drivers/net/wireless/ath/ath9k/hif_usb.c -+++ a/drivers/net/wireless/ath/ath9k/hif_usb.c -@@ -643,9 +643,9 @@ - - static void ath9k_hif_usb_rx_cb(struct urb *urb) - { -- struct rx_buf *rx_buf = (struct rx_buf *)urb->context; -- struct hif_device_usb *hif_dev = rx_buf->hif_dev; -- struct sk_buff *skb = rx_buf->skb; -+ struct sk_buff *skb = (struct sk_buff *) urb->context; -+ struct hif_device_usb *hif_dev = -+ usb_get_intfdata(usb_ifnum_to_if(urb->dev, 0)); - int ret; - - if (!skb) -@@ -685,15 +685,14 @@ - return; - free: - kfree_skb(skb); -- kfree(rx_buf); - } - - static void ath9k_hif_usb_reg_in_cb(struct urb *urb) - { -- struct rx_buf *rx_buf = (struct rx_buf *)urb->context; -- struct hif_device_usb *hif_dev = rx_buf->hif_dev; -- struct sk_buff *skb = rx_buf->skb; -+ struct sk_buff *skb = (struct sk_buff *) urb->context; - struct sk_buff *nskb; -+ struct hif_device_usb *hif_dev = -+ usb_get_intfdata(usb_ifnum_to_if(urb->dev, 0)); - int ret; - - if (!skb) -@@ -751,7 +750,6 @@ - return; - free: - kfree_skb(skb); -- kfree(rx_buf); - urb->context = NULL; - } - -@@ -797,7 +795,7 @@ - init_usb_anchor(&hif_dev->mgmt_submitted); - - for (i = 0; i < MAX_TX_URB_NUM; i++) { -- tx_buf = kzalloc(sizeof(*tx_buf), GFP_KERNEL); -+ tx_buf = kzalloc(sizeof(struct tx_buf), GFP_KERNEL); - if (!tx_buf) - goto err; - -@@ -834,9 +832,8 @@ - - static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev) - { -- struct rx_buf *rx_buf = NULL; -+ struct urb *urb = NULL; - struct sk_buff *skb = NULL; -- struct urb *urb = NULL; - int i, ret; - - init_usb_anchor(&hif_dev->rx_submitted); -@@ -844,12 +841,6 @@ - - for (i = 0; i < MAX_RX_URB_NUM; i++) { - -- rx_buf = kzalloc(sizeof(*rx_buf), GFP_KERNEL); -- if (!rx_buf) { -- ret = -ENOMEM; -- goto err_rxb; -- } -- - /* Allocate URB */ - urb = usb_alloc_urb(0, GFP_KERNEL); - if (urb == NULL) { -@@ -864,14 +855,11 @@ - goto err_skb; - } - -- rx_buf->hif_dev = hif_dev; -- rx_buf->skb = skb; -- - usb_fill_bulk_urb(urb, hif_dev->udev, - usb_rcvbulkpipe(hif_dev->udev, - USB_WLAN_RX_PIPE), - skb->data, MAX_RX_BUF_SIZE, -- ath9k_hif_usb_rx_cb, rx_buf); -+ ath9k_hif_usb_rx_cb, skb); - - /* Anchor URB */ - usb_anchor_urb(urb, &hif_dev->rx_submitted); -@@ -897,8 +885,6 @@ - err_skb: - usb_free_urb(urb); - err_urb: -- kfree(rx_buf); --err_rxb: - ath9k_hif_usb_dealloc_rx_urbs(hif_dev); - return ret; - } -@@ -910,21 +896,14 @@ - - static int ath9k_hif_usb_alloc_reg_in_urbs(struct hif_device_usb *hif_dev) - { -- struct rx_buf *rx_buf = NULL; -+ struct urb *urb = NULL; - struct sk_buff *skb = NULL; -- struct urb *urb = NULL; - int i, ret; - - init_usb_anchor(&hif_dev->reg_in_submitted); - - for (i = 0; i < MAX_REG_IN_URB_NUM; i++) { - -- rx_buf = kzalloc(sizeof(*rx_buf), GFP_KERNEL); -- if (!rx_buf) { -- ret = -ENOMEM; -- goto err_rxb; -- } -- - /* Allocate URB */ - urb = usb_alloc_urb(0, GFP_KERNEL); - if (urb == NULL) { -@@ -939,14 +918,11 @@ - goto err_skb; - } - -- rx_buf->hif_dev = hif_dev; -- rx_buf->skb = skb; -- - usb_fill_int_urb(urb, hif_dev->udev, - usb_rcvintpipe(hif_dev->udev, - USB_REG_IN_PIPE), - skb->data, MAX_REG_IN_BUF_SIZE, -- ath9k_hif_usb_reg_in_cb, rx_buf, 1); -+ ath9k_hif_usb_reg_in_cb, skb, 1); - - /* Anchor URB */ - usb_anchor_urb(urb, &hif_dev->reg_in_submitted); -@@ -972,8 +948,6 @@ - err_skb: - usb_free_urb(urb); - err_urb: -- kfree(rx_buf); --err_rxb: - ath9k_hif_usb_dealloc_reg_in_urbs(hif_dev); - return ret; - } -diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.h b/drivers/net/wireless/ath/ath9k/hif_usb.h -index a94e7e1c86e9..5985aa15ca93 100644 ---- b/drivers/net/wireless/ath/ath9k/hif_usb.h -+++ a/drivers/net/wireless/ath/ath9k/hif_usb.h -@@ -86,11 +86,6 @@ - struct list_head list; - }; - --struct rx_buf { -- struct sk_buff *skb; -- struct hif_device_usb *hif_dev; --}; -- - #define HIF_USB_TX_STOP BIT(0) - #define HIF_USB_TX_FLUSH BIT(1) - -+- -cgit 1.2.3-1.el7 - -- cgit v1.2.3 From 5f63905096e456097fca206f56ce9257f72faf64 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 22 Jul 2020 13:47:39 -0400 Subject: gnu: Fix Krita. Fixes . Reported by linka on #guix. * gnu/packages/patches/qtbase-fix-krita-deadlock.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/kde.scm (qtbase-for-krita): New variable. (krita)[inputs]: Replace qtbase with qtbase-for-krita. --- .../patches/qtbase-fix-krita-deadlock.patch | 110 +++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 gnu/packages/patches/qtbase-fix-krita-deadlock.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/qtbase-fix-krita-deadlock.patch b/gnu/packages/patches/qtbase-fix-krita-deadlock.patch new file mode 100644 index 0000000000..d3554be3c9 --- /dev/null +++ b/gnu/packages/patches/qtbase-fix-krita-deadlock.patch @@ -0,0 +1,110 @@ +Fix a deadlock in Krita: + +https://bugreports.qt.io/browse/QTBUG-83207 + +Patch copied from Qt bug tracker: + +https://codereview.qt-project.org/c/qt/qtbase/+/296034 + +From 276fa8383a7535765be7182883ef4aade17ce013 Mon Sep 17 00:00:00 2001 +From: Thiago Macieira +Date: Thu, 02 Apr 2020 12:08:41 -0300 +Subject: [PATCH] QLibrary: fix deadlock caused by fix to QTBUG-39642 + +Commit ae6f73e8566fa76470937aca737141183929a5ec inserted a mutex around +the entire load_sys(). We had reasoed that deadlocks would only occur if +the object creation in instance() recursed into its own instance(), +which was already a bug. But we had forgotten that dlopen()/ +LoadLibrary() executes initialization code from the module being loaded, +which could cause a recursion back into the same QPluginLoader or +QLibrary object. This recursion is benign because the module *is* loaded +and dlopen()/LoadLibrary() returns the same handle. + +[ChangeLog][QtCore][QLibrary and QPluginLoader] Fixed a deadlock that +would happen if the plugin or library being loaded has load-time +initialization code (C++ global variables) that recursed back into the +same QLibrary or QPluginLoader object. + +PS: QLibraryPrivate::loadPlugin() updates pluginState outside a mutex +lock, so pluginState should be made an atomic variable. Once that is +done, we'll only need locking the mutex to update errorString (no +locking before loading). + +Fixes: QTBUG-83207 +Task-number: QTBUG-39642 +Change-Id: Ibdc95e9af7bd456a94ecfffd160209304e5ab2eb +Reviewed-by: Volker Hilsheimer +Reviewed-by: David Faure +--- + +diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp +index ddb053c..be9d92b 100644 +--- a/src/corelib/plugin/qlibrary.cpp ++++ b/src/corelib/plugin/qlibrary.cpp +@@ -576,9 +576,7 @@ + + Q_TRACE(QLibraryPrivate_load_entry, fileName); + +- mutex.lock(); + bool ret = load_sys(); +- mutex.unlock(); + if (qt_debug_component()) { + if (ret) { + qDebug() << "loaded library" << fileName; +diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp +index 017aa97..a5c72f8 100644 +--- a/src/corelib/plugin/qlibrary_unix.cpp ++++ b/src/corelib/plugin/qlibrary_unix.cpp +@@ -123,6 +123,7 @@ + + bool QLibraryPrivate::load_sys() + { ++ QMutexLocker locker(&mutex); + QString attempt; + QFileSystemEntry fsEntry(fileName); + +@@ -213,6 +214,7 @@ + } + #endif + ++ locker.unlock(); + bool retry = true; + Handle hnd = nullptr; + for (int prefix = 0; retry && !hnd && prefix < prefixes.size(); prefix++) { +@@ -273,6 +275,8 @@ + } + } + #endif ++ ++ locker.relock(); + if (!hnd) { + errorString = QLibrary::tr("Cannot load library %1: %2").arg(fileName, qdlerror()); + } +diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp +index 000bf76..ef58724 100644 +--- a/src/corelib/plugin/qlibrary_win.cpp ++++ b/src/corelib/plugin/qlibrary_win.cpp +@@ -78,6 +78,7 @@ + // fileName + // + // NB If it's a plugin we do not ever try the ".dll" extension ++ QMutexLocker locker(&mutex); + QStringList attempts; + + if (pluginState != IsAPlugin) +@@ -95,6 +96,7 @@ + attempts.prepend(QDir::rootPath() + fileName); + #endif + ++ locker.unlock(); + Handle hnd = nullptr; + for (const QString &attempt : qAsConst(attempts)) { + #ifndef Q_OS_WINRT +@@ -115,6 +117,7 @@ + #ifndef Q_OS_WINRT + SetErrorMode(oldmode); + #endif ++ locker.relock(); + if (!hnd) { + errorString = QLibrary::tr("Cannot load library %1: %2").arg( + QDir::toNativeSeparators(fileName), qt_error_string()); -- cgit v1.2.3 From e61b3bcd79a85babde19101118e9d51cd769fbbb Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Thu, 23 Jul 2020 16:53:52 -0400 Subject: Revert "gnu: Fix Krita." This reverts commit 5f63905096e456097fca206f56ce9257f72faf64. This commit caused `guix pull` to crash like this: ------ Backtrace: In ice-9/boot-9.scm: 222:29 19 (map1 _) 222:29 18 (map1 _) 222:29 17 (map1 _) 222:29 16 (map1 _) 222:17 15 (map1 (((gnu packages kde)) ((gnu packages libevent)) ((gnu packages libidn)) ((gnu packages #)) ((?)) ?)) 3297:17 14 (resolve-interface (gnu packages kde) #:select _ #:hide _ #:prefix _ #:renamer _ #:version _) In ice-9/threads.scm: 390:8 13 (_ _) In ice-9/boot-9.scm: 3223:13 12 (_) In ice-9/threads.scm: 390:8 11 (_ _) In ice-9/boot-9.scm: 3507:20 10 (_) 2806:4 9 (save-module-excursion _) 3527:26 8 (_) In unknown file: 7 (primitive-load-path "gnu/packages/kde" #) In ice-9/eval.scm: 626:19 6 (_ #) 293:34 5 (_ #) 173:47 4 (_ #(# #)) 159:9 3 (_ #(# #)) 191:35 2 (_ #(# #)) 223:20 1 (proc #(# #)) In unknown file: 0 (%resolve-variable (7 . qtbase) #) ERROR: In procedure %resolve-variable: error: qtbase: unbound variable ------ --- .../patches/qtbase-fix-krita-deadlock.patch | 110 --------------------- 1 file changed, 110 deletions(-) delete mode 100644 gnu/packages/patches/qtbase-fix-krita-deadlock.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/qtbase-fix-krita-deadlock.patch b/gnu/packages/patches/qtbase-fix-krita-deadlock.patch deleted file mode 100644 index d3554be3c9..0000000000 --- a/gnu/packages/patches/qtbase-fix-krita-deadlock.patch +++ /dev/null @@ -1,110 +0,0 @@ -Fix a deadlock in Krita: - -https://bugreports.qt.io/browse/QTBUG-83207 - -Patch copied from Qt bug tracker: - -https://codereview.qt-project.org/c/qt/qtbase/+/296034 - -From 276fa8383a7535765be7182883ef4aade17ce013 Mon Sep 17 00:00:00 2001 -From: Thiago Macieira -Date: Thu, 02 Apr 2020 12:08:41 -0300 -Subject: [PATCH] QLibrary: fix deadlock caused by fix to QTBUG-39642 - -Commit ae6f73e8566fa76470937aca737141183929a5ec inserted a mutex around -the entire load_sys(). We had reasoed that deadlocks would only occur if -the object creation in instance() recursed into its own instance(), -which was already a bug. But we had forgotten that dlopen()/ -LoadLibrary() executes initialization code from the module being loaded, -which could cause a recursion back into the same QPluginLoader or -QLibrary object. This recursion is benign because the module *is* loaded -and dlopen()/LoadLibrary() returns the same handle. - -[ChangeLog][QtCore][QLibrary and QPluginLoader] Fixed a deadlock that -would happen if the plugin or library being loaded has load-time -initialization code (C++ global variables) that recursed back into the -same QLibrary or QPluginLoader object. - -PS: QLibraryPrivate::loadPlugin() updates pluginState outside a mutex -lock, so pluginState should be made an atomic variable. Once that is -done, we'll only need locking the mutex to update errorString (no -locking before loading). - -Fixes: QTBUG-83207 -Task-number: QTBUG-39642 -Change-Id: Ibdc95e9af7bd456a94ecfffd160209304e5ab2eb -Reviewed-by: Volker Hilsheimer -Reviewed-by: David Faure ---- - -diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp -index ddb053c..be9d92b 100644 ---- a/src/corelib/plugin/qlibrary.cpp -+++ b/src/corelib/plugin/qlibrary.cpp -@@ -576,9 +576,7 @@ - - Q_TRACE(QLibraryPrivate_load_entry, fileName); - -- mutex.lock(); - bool ret = load_sys(); -- mutex.unlock(); - if (qt_debug_component()) { - if (ret) { - qDebug() << "loaded library" << fileName; -diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp -index 017aa97..a5c72f8 100644 ---- a/src/corelib/plugin/qlibrary_unix.cpp -+++ b/src/corelib/plugin/qlibrary_unix.cpp -@@ -123,6 +123,7 @@ - - bool QLibraryPrivate::load_sys() - { -+ QMutexLocker locker(&mutex); - QString attempt; - QFileSystemEntry fsEntry(fileName); - -@@ -213,6 +214,7 @@ - } - #endif - -+ locker.unlock(); - bool retry = true; - Handle hnd = nullptr; - for (int prefix = 0; retry && !hnd && prefix < prefixes.size(); prefix++) { -@@ -273,6 +275,8 @@ - } - } - #endif -+ -+ locker.relock(); - if (!hnd) { - errorString = QLibrary::tr("Cannot load library %1: %2").arg(fileName, qdlerror()); - } -diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp -index 000bf76..ef58724 100644 ---- a/src/corelib/plugin/qlibrary_win.cpp -+++ b/src/corelib/plugin/qlibrary_win.cpp -@@ -78,6 +78,7 @@ - // fileName - // - // NB If it's a plugin we do not ever try the ".dll" extension -+ QMutexLocker locker(&mutex); - QStringList attempts; - - if (pluginState != IsAPlugin) -@@ -95,6 +96,7 @@ - attempts.prepend(QDir::rootPath() + fileName); - #endif - -+ locker.unlock(); - Handle hnd = nullptr; - for (const QString &attempt : qAsConst(attempts)) { - #ifndef Q_OS_WINRT -@@ -115,6 +117,7 @@ - #ifndef Q_OS_WINRT - SetErrorMode(oldmode); - #endif -+ locker.relock(); - if (!hnd) { - errorString = QLibrary::tr("Cannot load library %1: %2").arg( - QDir::toNativeSeparators(fileName), qt_error_string()); -- cgit v1.2.3 From 0448bfe2d769998ba33c288a07738e13b02113a4 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 22 Jul 2020 13:47:39 -0400 Subject: gnu: Fix Krita. Fixes . Reported by linka on #guix. * gnu/packages/patches/qtbase-fix-krita-deadlock.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/qt.scm (qtbase-for-krita): New variable. * gnu/packages/kde.scm (krita)[inputs]: Replace qtbase with qtbase-for-krita. --- .../patches/qtbase-fix-krita-deadlock.patch | 110 +++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 gnu/packages/patches/qtbase-fix-krita-deadlock.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/qtbase-fix-krita-deadlock.patch b/gnu/packages/patches/qtbase-fix-krita-deadlock.patch new file mode 100644 index 0000000000..d3554be3c9 --- /dev/null +++ b/gnu/packages/patches/qtbase-fix-krita-deadlock.patch @@ -0,0 +1,110 @@ +Fix a deadlock in Krita: + +https://bugreports.qt.io/browse/QTBUG-83207 + +Patch copied from Qt bug tracker: + +https://codereview.qt-project.org/c/qt/qtbase/+/296034 + +From 276fa8383a7535765be7182883ef4aade17ce013 Mon Sep 17 00:00:00 2001 +From: Thiago Macieira +Date: Thu, 02 Apr 2020 12:08:41 -0300 +Subject: [PATCH] QLibrary: fix deadlock caused by fix to QTBUG-39642 + +Commit ae6f73e8566fa76470937aca737141183929a5ec inserted a mutex around +the entire load_sys(). We had reasoed that deadlocks would only occur if +the object creation in instance() recursed into its own instance(), +which was already a bug. But we had forgotten that dlopen()/ +LoadLibrary() executes initialization code from the module being loaded, +which could cause a recursion back into the same QPluginLoader or +QLibrary object. This recursion is benign because the module *is* loaded +and dlopen()/LoadLibrary() returns the same handle. + +[ChangeLog][QtCore][QLibrary and QPluginLoader] Fixed a deadlock that +would happen if the plugin or library being loaded has load-time +initialization code (C++ global variables) that recursed back into the +same QLibrary or QPluginLoader object. + +PS: QLibraryPrivate::loadPlugin() updates pluginState outside a mutex +lock, so pluginState should be made an atomic variable. Once that is +done, we'll only need locking the mutex to update errorString (no +locking before loading). + +Fixes: QTBUG-83207 +Task-number: QTBUG-39642 +Change-Id: Ibdc95e9af7bd456a94ecfffd160209304e5ab2eb +Reviewed-by: Volker Hilsheimer +Reviewed-by: David Faure +--- + +diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp +index ddb053c..be9d92b 100644 +--- a/src/corelib/plugin/qlibrary.cpp ++++ b/src/corelib/plugin/qlibrary.cpp +@@ -576,9 +576,7 @@ + + Q_TRACE(QLibraryPrivate_load_entry, fileName); + +- mutex.lock(); + bool ret = load_sys(); +- mutex.unlock(); + if (qt_debug_component()) { + if (ret) { + qDebug() << "loaded library" << fileName; +diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp +index 017aa97..a5c72f8 100644 +--- a/src/corelib/plugin/qlibrary_unix.cpp ++++ b/src/corelib/plugin/qlibrary_unix.cpp +@@ -123,6 +123,7 @@ + + bool QLibraryPrivate::load_sys() + { ++ QMutexLocker locker(&mutex); + QString attempt; + QFileSystemEntry fsEntry(fileName); + +@@ -213,6 +214,7 @@ + } + #endif + ++ locker.unlock(); + bool retry = true; + Handle hnd = nullptr; + for (int prefix = 0; retry && !hnd && prefix < prefixes.size(); prefix++) { +@@ -273,6 +275,8 @@ + } + } + #endif ++ ++ locker.relock(); + if (!hnd) { + errorString = QLibrary::tr("Cannot load library %1: %2").arg(fileName, qdlerror()); + } +diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp +index 000bf76..ef58724 100644 +--- a/src/corelib/plugin/qlibrary_win.cpp ++++ b/src/corelib/plugin/qlibrary_win.cpp +@@ -78,6 +78,7 @@ + // fileName + // + // NB If it's a plugin we do not ever try the ".dll" extension ++ QMutexLocker locker(&mutex); + QStringList attempts; + + if (pluginState != IsAPlugin) +@@ -95,6 +96,7 @@ + attempts.prepend(QDir::rootPath() + fileName); + #endif + ++ locker.unlock(); + Handle hnd = nullptr; + for (const QString &attempt : qAsConst(attempts)) { + #ifndef Q_OS_WINRT +@@ -115,6 +117,7 @@ + #ifndef Q_OS_WINRT + SetErrorMode(oldmode); + #endif ++ locker.relock(); + if (!hnd) { + errorString = QLibrary::tr("Cannot load library %1: %2").arg( + QDir::toNativeSeparators(fileName), qt_error_string()); -- cgit v1.2.3 From beb7a28110cfd9f6a134421aade9adaba12d1baa Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 24 Jul 2020 13:58:33 +0200 Subject: gnu: luminance-hdr: Update to 2.6.0. * gnu/packages/patches/luminance-hdr-qt-printer.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/image-viewers.scm (luminance-hdr): Update to 2.6.0. [inputs]: Add QTSVG and EIGEN. [arguments]: Add #:tests? #f. --- .../patches/luminance-hdr-qt-printer.patch | 28 ---------------------- 1 file changed, 28 deletions(-) delete mode 100644 gnu/packages/patches/luminance-hdr-qt-printer.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/luminance-hdr-qt-printer.patch b/gnu/packages/patches/luminance-hdr-qt-printer.patch deleted file mode 100644 index c65f9537cd..0000000000 --- a/gnu/packages/patches/luminance-hdr-qt-printer.patch +++ /dev/null @@ -1,28 +0,0 @@ -Allow the 'QtPrinter' header to be found, as described -at . - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index fbad8a2..8379c8a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -29,6 +29,7 @@ find_package(Qt5Xml) - find_package(Qt5Sql) - find_package(Qt5Network) - find_package(Qt5LinguistTools) -+find_package(Qt5PrintSupport REQUIRED) - IF(WIN32) - find_package(Qt5WinExtras) - ENDIF() -diff --git a/src/HelpBrowser/CMakeLists.txt b/src/HelpBrowser/CMakeLists.txt -index 04319a8..5537dae 100644 ---- a/src/HelpBrowser/CMakeLists.txt -+++ b/src/HelpBrowser/CMakeLists.txt -@@ -29,7 +29,7 @@ QT5_WRAP_UI(FILES_UI_H ${FILES_UI}) - - - ADD_LIBRARY(helpbrowser ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H} ${FILES_HXX}) --qt5_use_modules(helpbrowser Core Concurrent Gui Widgets Xml WebKit WebKitWidgets) -+qt5_use_modules(helpbrowser Core Concurrent Gui Widgets Xml WebKit WebKitWidgets PrintSupport) - - SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} ${FILES_HXX} PARENT_SCOPE) - SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} helpbrowser PARENT_SCOPE) -- cgit v1.2.3